From patchwork Fri Aug 15 12:40:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 35461 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 13CC320523 for ; Fri, 15 Aug 2014 12:40:42 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id vb8sf14683378obc.4 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=uodjIsOMf3IDKHwVZkJRN5qY8+fYYR4SoNadx2GsRAU=; b=KT5w+sn3Vm9yqpi9f3yzmTqYv4VWhR+krwT6E5bxiOJtSkfoZPZWKHN5MhHhX2Kj0r cC1OV2mhAK4CWpWuCaqaqBJsJjnVfsR9s/OXzlPVTERMgQEAex0kVREby7YlXDVMq2mg AMfmj9s38pROUhaXr2Ry4zXPF7sLB2tWeZj+v+ft5XOcvB7TIkdfJot7/wRJm1WNEsTc ehakS11m59tO2ZFry/comFKZFSS1bo8uAsHwxe8WubO577FsrGS4ZRtF9l24EVWPfLcc aEA2OMyZsBOI4Jc+0KeIGlyNvn1gYVoiXhRt8/vMnDk51mXz/sWjwngBUr4GMURtTlwv NtrQ== X-Gm-Message-State: ALoCoQmSvl+AYmfx17IaenmHorpTKY26fPMaspoXRiKMEB+OgJllyvR5iT4O/xhR1bhvSExxhlJm X-Received: by 10.182.110.130 with SMTP id ia2mr124584obb.42.1408106441709; Fri, 15 Aug 2014 05:40:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.136 with SMTP id e8ls240739qgf.36.gmail; Fri, 15 Aug 2014 05:40:41 -0700 (PDT) X-Received: by 10.224.137.65 with SMTP id v1mr26757418qat.53.1408106441594; Fri, 15 Aug 2014 05:40:41 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id x9si11642690qco.17.2014.08.15.05.40.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Aug 2014 05:40:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hq11so2848392vcb.38 for ; Fri, 15 Aug 2014 05:40:41 -0700 (PDT) X-Received: by 10.52.246.198 with SMTP id xy6mr13199330vdc.7.1408106441400; Fri, 15 Aug 2014 05:40:41 -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 tc5csp109588vcb; Fri, 15 Aug 2014 05:40:40 -0700 (PDT) X-Received: by 10.194.184.166 with SMTP id ev6mr19891408wjc.61.1408106440455; Fri, 15 Aug 2014 05:40:40 -0700 (PDT) Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by mx.google.com with ESMTPS id ez4si2464172wic.78.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 peter.griffin@linaro.org designates 74.125.82.43 as permitted sender) client-ip=74.125.82.43; Received: by mail-wg0-f43.google.com with SMTP id l18so2261414wgh.26 for ; Fri, 15 Aug 2014 05:40:40 -0700 (PDT) X-Received: by 10.194.158.101 with SMTP id wt5mr1579975wjb.136.1408106439955; Fri, 15 Aug 2014 05:40:39 -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.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Aug 2014 05:40:39 -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 9/9] phy: phy-spear1340-miphy: Use module_platform_driver to register driver. Date: Fri, 15 Aug 2014 13:40:16 +0100 Message-Id: <1408106416-19044-10-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.179 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: , Using 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-spear1340-miphy.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/phy/phy-spear1340-miphy.c b/drivers/phy/phy-spear1340-miphy.c index ee4d66f..1ecd094 100644 --- a/drivers/phy/phy-spear1340-miphy.c +++ b/drivers/phy/phy-spear1340-miphy.c @@ -282,23 +282,12 @@ static struct platform_driver spear1340_miphy_driver = { .probe = spear1340_miphy_probe, .driver = { .name = "spear1340-miphy", - .owner = THIS_MODULE, .pm = &spear1340_miphy_pm_ops, .of_match_table = of_match_ptr(spear1340_miphy_of_match), }, }; -static int __init spear1340_miphy_phy_init(void) -{ - return platform_driver_register(&spear1340_miphy_driver); -} -module_init(spear1340_miphy_phy_init); - -static void __exit spear1340_miphy_phy_exit(void) -{ - platform_driver_unregister(&spear1340_miphy_driver); -} -module_exit(spear1340_miphy_phy_exit); +module_platform_driver(spear1340_miphy_driver); MODULE_DESCRIPTION("ST SPEAR1340-MIPHY driver"); MODULE_AUTHOR("Pratyush Anand ");