From patchwork Wed Dec 19 11:17:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13657 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 189F423E04 for ; Wed, 19 Dec 2012 11:24:38 +0000 (UTC) Received: from mail-ia0-f181.google.com (mail-ia0-f181.google.com [209.85.210.181]) by fiordland.canonical.com (Postfix) with ESMTP id B5DC4A18698 for ; Wed, 19 Dec 2012 11:24:37 +0000 (UTC) Received: by mail-ia0-f181.google.com with SMTP id s32so1615313iak.12 for ; Wed, 19 Dec 2012 03:24:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=W3St0bEgerwi3U9XywXvf9zcTy6tidu2UdNZvaQVCVI=; b=FiG2RNJoaOYmOhXoGotBQL0/9qBb1y0j5jh1bgBqGjjy8OboDd67hPXpkx941T5xE4 H0iG33QDs7RJb1KZZ/+2iEB+bZJUmNDu90V/H7SjKwdA1ifHx2dx3C9i2+I+cMcfvxx8 NR6FYWw7YGZ4A1+DNa/ceA6S1yFpFami+etKYzFDmtP2/G7Sk60IMXbASfQUtx+zZxEY ET3Lh4VqD0AcJPJT12PTkR9zWoTjEnLV6FkzanoDwzgmQGrDahi5gNBZV1+McqrZ3YZP 1/n6MT+kMZuVhpcx6C+i5S1Hv7rotIwq05SVdyTv85Iljg2MjI0i4CftpigzcXYVoFv+ akKA== X-Received: by 10.50.190.163 with SMTP id gr3mr1583970igc.106.1355916277063; Wed, 19 Dec 2012 03:24:37 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.115 with SMTP id m19csp227601igt; Wed, 19 Dec 2012 03:24:36 -0800 (PST) X-Received: by 10.66.81.198 with SMTP id c6mr16412164pay.50.1355916275814; Wed, 19 Dec 2012 03:24:35 -0800 (PST) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id i7si5416906pay.276.2012.12.19.03.24.35 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 03:24:35 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f53.google.com with SMTP id hz1so1244680pad.12 for ; Wed, 19 Dec 2012 03:24:35 -0800 (PST) X-Received: by 10.68.217.4 with SMTP id ou4mr17319269pbc.88.1355916275210; Wed, 19 Dec 2012 03:24:35 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oz9sm2957305pbb.68.2012.12.19.03.24.31 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 03:24:34 -0800 (PST) From: Sachin Kamat To: netdev@vger.kernel.org Cc: steve.glendinning@shawell.net, davem@davemloft.net, sachin.kamat@linaro.org, patches@linaro.org, nico@fluxnic.net Subject: [PATCH 1/2] drivers/net: Use of_match_ptr() macro in smc91x.c Date: Wed, 19 Dec 2012 16:47:09 +0530 Message-Id: <1355915830-29481-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQnu/vqNypR/eQFyzB4A9KspbI598G21O8AoCoNQ85V+/rjdv5UW3pS01EmeXxbzAZhrF5Y1 This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat --- Compile tested on linux-next. --- drivers/net/ethernet/smsc/smc91x.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 022b45b..a670d23 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -2386,8 +2386,6 @@ static const struct of_device_id smc91x_match[] = { {}, }; MODULE_DEVICE_TABLE(of, smc91x_match); -#else -#define smc91x_match NULL #endif static struct dev_pm_ops smc_drv_pm_ops = { @@ -2402,7 +2400,7 @@ static struct platform_driver smc_driver = { .name = CARDNAME, .owner = THIS_MODULE, .pm = &smc_drv_pm_ops, - .of_match_table = smc91x_match, + .of_match_table = of_match_ptr(smc91x_match), }, };