From patchwork Wed Sep 24 13:47:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 37827 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6C7AC204FF for ; Wed, 24 Sep 2014 13:49:52 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y10sf3671217wgg.10 for ; Wed, 24 Sep 2014 06:49:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=qoKk/5y9O9To82RspKuFYR6dcINxzz38r7h7gTrbUjs=; b=bPnyO17GDNK9eHZGZ1UNbLUB/otCknvDV+xNIuLje6VT0w5QHRSABm/IHT7qw45AD2 3nR/mWRMp+SAuMf+NZ2blUtTBlwZHjlxfHhThPNsnAl3PtEcc13jmlE0nZmw3ln1X0cu IMZEqUkLmHWlnNLSmdPXGEvcjBcunOKTbAviwiwH84b/NDGTD5I6axbW5HjIrT4NPIc5 6eRKFfZoR3n8fDT10evkEaf7ITv6AwLpbVYuQMlhqAG3l1pt3AdKadZDbSQ6XTsyDo+M 8yVLSILdLeRgf0jTsUzlfQALXYZmdOGEzpHf6Qqj2MvaG8lEJXWW9CH0fWxu2saZpz2s TiDA== X-Gm-Message-State: ALoCoQlENlfv7bCYD/9d7EkaoRiMe53siexadyPfxcFyIza8TRmUZzZFJbvEjfrzI5omYk8sgXzr X-Received: by 10.112.89.8 with SMTP id bk8mr1035978lbb.6.1411566591619; Wed, 24 Sep 2014 06:49:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.6 with SMTP id 6ls151802lay.26.gmail; Wed, 24 Sep 2014 06:49:51 -0700 (PDT) X-Received: by 10.112.17.2 with SMTP id k2mr6393570lbd.28.1411566591449; Wed, 24 Sep 2014 06:49:51 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) by mx.google.com with ESMTPS id y10si22937201laj.52.2014.09.24.06.49.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Sep 2014 06:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id b6so5397570lbj.40 for ; Wed, 24 Sep 2014 06:49:51 -0700 (PDT) X-Received: by 10.112.4.33 with SMTP id h1mr6052470lbh.67.1411566591345; Wed, 24 Sep 2014 06:49:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp585336lbb; Wed, 24 Sep 2014 06:49:50 -0700 (PDT) X-Received: by 10.66.231.200 with SMTP id ti8mr9349403pac.27.1411566589853; Wed, 24 Sep 2014 06:49:49 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qc2si15399470pbb.149.2014.09.24.06.49.47 for ; Wed, 24 Sep 2014 06:49:49 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753407AbaIXNtq (ORCPT + 27 others); Wed, 24 Sep 2014 09:49:46 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:51008 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753705AbaIXNrw (ORCPT ); Wed, 24 Sep 2014 09:47:52 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s8ODlp6g031922; Wed, 24 Sep 2014 08:47:51 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8ODlaAA009446; Wed, 24 Sep 2014 08:47:36 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 24 Sep 2014 08:47:36 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8ODlKDS015622; Wed, 24 Sep 2014 08:47:35 -0500 From: Kishon Vijay Abraham I To: CC: , Subject: [PATCH 09/22] phy: phy-spear1340-miphy: Use module_platform_driver to register driver. Date: Wed, 24 Sep 2014 19:17:07 +0530 Message-ID: <1411566440-19169-10-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1411566440-19169-1-git-send-email-kishon@ti.com> References: <1411566440-19169-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kishon@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Peter Griffin 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 Signed-off-by: Kishon Vijay Abraham I --- 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 ");