From patchwork Fri Aug 15 12:40:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 35460 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6648F20523 for ; Fri, 15 Aug 2014 12:40:41 +0000 (UTC) Received: by mail-oi0-f70.google.com with SMTP id u20sf12002865oif.5 for ; Fri, 15 Aug 2014 05:40:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=7Be+cZTwF65kmqsaCC04B/MREY9pE9P19BYUwiQJDWY=; b=L11O1uoJ1ieR5/8Dy9+kTTOC+CCGo0ckbkt+2UDuZmXm+ULUxU4m2GIbr82F/qlj3d w82aJoUUuFOoqEqPbMcgFeOXYb7PzMZ8/frpBw02i7zvuEmUxtThgt3Mj393FLYcOTZl MDxzBZiVzDKtH4qFXeFhNtx5UZadLMVas+zByc9yp77GTHJyG60Po+wIW53qtbinXTvA lki1QQr/SvS02c8dMZG0YCiO7RaTzPAlK/MymjjWp44/ivCBXPl+N+JkPhJnMIAR846h ZSJEb7sn7pj3aPC324xmG+ZrO8izOfj6+hK7aJ9/U8EOtfN8Y63iMufbhScsiV6k/5JE upWA== X-Gm-Message-State: ALoCoQkWKqesa9nrEc/pZuzPQV+V5AsxuCv4V38p2ll5OOt2B6lZvB8vYhtxSGYfXHTr1E96cohS X-Received: by 10.182.45.197 with SMTP id p5mr9115636obm.2.1408106441034; Fri, 15 Aug 2014 05:40:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.5 with SMTP id u5ls1451161qgd.72.gmail; Fri, 15 Aug 2014 05:40:40 -0700 (PDT) X-Received: by 10.224.129.6 with SMTP id m6mr27191765qas.84.1408106440790; Fri, 15 Aug 2014 05:40:40 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id n12si11651281qae.42.2014.08.15.05.40.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Aug 2014 05:40:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id hy4so2804895vcb.8 for ; Fri, 15 Aug 2014 05:40:39 -0700 (PDT) X-Received: by 10.52.88.74 with SMTP id be10mr789509vdb.54.1408106439323; Fri, 15 Aug 2014 05:40:39 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp109584vcb; Fri, 15 Aug 2014 05:40:38 -0700 (PDT) X-Received: by 10.194.89.168 with SMTP id bp8mr20154292wjb.53.1408106438181; Fri, 15 Aug 2014 05:40:38 -0700 (PDT) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by mx.google.com with ESMTPS id qa1si11347865wjc.13.2014.08.15.05.40.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Aug 2014 05:40:38 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 74.125.82.45 as permitted sender) client-ip=74.125.82.45; Received: by mail-wg0-f45.google.com with SMTP id x12so2323958wgg.16 for ; Fri, 15 Aug 2014 05:40:37 -0700 (PDT) X-Received: by 10.194.95.234 with SMTP id dn10mr20705677wjb.73.1408106437793; Fri, 15 Aug 2014 05:40:37 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by mx.google.com with ESMTPSA id fr2sm6486559wib.7.2014.08.15.05.40.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Aug 2014 05:40:37 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kishon@ti.com, kgene.kim@samsung.com, maxime.ripard@free-electrons.com, linux-samsung-soc@vger.kernel.org Cc: peter.griffin@linaro.org, patches@linaro.org, lee.jones@linaro.org Subject: [PATCH 8/9] phy: phy-spear1310-miphy: Use module_platform_driver to register driver. Date: Fri, 15 Aug 2014 13:40:15 +0100 Message-Id: <1408106416-19044-9-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org> References: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use the module_platform_driver macro to register the driver as this gets rid of a lot of the boilerplate code. Also remove .owner field as this gets overridden in __platform_driver_register. Signed-off-by: Peter Griffin --- drivers/phy/phy-spear1310-miphy.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/phy/phy-spear1310-miphy.c b/drivers/phy/phy-spear1310-miphy.c index 911d25b..5f4c586 100644 --- a/drivers/phy/phy-spear1310-miphy.c +++ b/drivers/phy/phy-spear1310-miphy.c @@ -250,22 +250,11 @@ static struct platform_driver spear1310_miphy_driver = { .probe = spear1310_miphy_probe, .driver = { .name = "spear1310-miphy", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(spear1310_miphy_of_match), }, }; -static int __init spear1310_miphy_phy_init(void) -{ - return platform_driver_register(&spear1310_miphy_driver); -} -module_init(spear1310_miphy_phy_init); - -static void __exit spear1310_miphy_phy_exit(void) -{ - platform_driver_unregister(&spear1310_miphy_driver); -} -module_exit(spear1310_miphy_phy_exit); +module_platform_driver(spear1310_miphy_driver); MODULE_DESCRIPTION("ST SPEAR1310-MIPHY driver"); MODULE_AUTHOR("Pratyush Anand ");