From patchwork Wed Dec 19 11:17:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13658 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 C9D7B23E04 for ; Wed, 19 Dec 2012 11:24:40 +0000 (UTC) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by fiordland.canonical.com (Postfix) with ESMTP id 7EB21A18698 for ; Wed, 19 Dec 2012 11:24:40 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id c13so2581941ieb.3 for ; Wed, 19 Dec 2012 03:24:39 -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 :in-reply-to:references:x-gm-message-state; bh=l4Pt15mjoWAWMBi9OrdxDoUlIG+ycLqtw6NUxq8ltcE=; b=X7Kcc/yL7mCvFUUliRjt1vfhH9+GXNNWUva1AGaX1HIAylMfOktRg2BU5yP/jFTRqw x0wh53wJnwSn9okmrTu/2aUQvCShiyjz5B1iGwRb0OW7Jrorc27zefQ4J5BulLia1/c0 GEm4V4qogOESyqJFiYCYFLEj7fnBg0vN8UJvYfJU4zCwyP5JPeR2YymbT+o1fW588MwG wyH0kYxuJCH2bfLHayd2pogc8btKNgTYpLSusBwwhViAdd+IEr6tntCL+B1/WuIa/1SP HpmDqhPMGCTra/nfN1Aon5ShmdnFYZXRIwnGGHj/c8OW0NA1avVe5vK8xigu8UlGV/MC OPJQ== X-Received: by 10.50.53.175 with SMTP id c15mr1582162igp.106.1355916279846; Wed, 19 Dec 2012 03:24:39 -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 m19csp227607igt; Wed, 19 Dec 2012 03:24:39 -0800 (PST) X-Received: by 10.68.233.7 with SMTP id ts7mr13749856pbc.136.1355916278972; Wed, 19 Dec 2012 03:24:38 -0800 (PST) Received: from mail-da0-f45.google.com (mail-da0-f45.google.com [209.85.210.45]) by mx.google.com with ESMTPS id rg4si5028150pbc.53.2012.12.19.03.24.38 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 03:24:38 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.45 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.45; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.45 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-da0-f45.google.com with SMTP id w4so873353dam.18 for ; Wed, 19 Dec 2012 03:24:38 -0800 (PST) X-Received: by 10.68.252.69 with SMTP id zq5mr17487568pbc.104.1355916278596; Wed, 19 Dec 2012 03:24:38 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id oz9sm2957305pbb.68.2012.12.19.03.24.35 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Dec 2012 03:24:37 -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 2/2] drivers/net: Use of_match_ptr() macro in smsc911x.c Date: Wed, 19 Dec 2012 16:47:10 +0530 Message-Id: <1355915830-29481-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1355915830-29481-1-git-send-email-sachin.kamat@linaro.org> References: <1355915830-29481-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQkm7r0SDmv1UPTn6e4TLFPfeOLAur3S1Jyml5HKvzAC1OXR9tUEoql8vciE78mAdGhgM6NK Add CONFIG_OF guard and use of_match_ptr macro. Signed-off-by: Sachin Kamat --- Compile tested on linux-next. --- drivers/net/ethernet/smsc/smsc911x.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 4616bf2..e112877 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c @@ -2575,11 +2575,13 @@ static const struct dev_pm_ops smsc911x_pm_ops = { #define SMSC911X_PM_OPS NULL #endif +#ifdef CONFIG_OF static const struct of_device_id smsc911x_dt_ids[] = { { .compatible = "smsc,lan9115", }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, smsc911x_dt_ids); +#endif static struct platform_driver smsc911x_driver = { .probe = smsc911x_drv_probe, @@ -2588,7 +2590,7 @@ static struct platform_driver smsc911x_driver = { .name = SMSC_CHIPNAME, .owner = THIS_MODULE, .pm = SMSC911X_PM_OPS, - .of_match_table = smsc911x_dt_ids, + .of_match_table = of_match_ptr(smsc911x_dt_ids), }, };