From patchwork Wed Sep 24 13:47:06 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: 37815 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3ACD420BF9 for ; Wed, 24 Sep 2014 13:48:36 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id hi2sf3595360wib.11 for ; Wed, 24 Sep 2014 06:48:35 -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=+xbrXRA55alIIS4LjyE8QesLSbSAr/9chUsv06pcjQI=; b=BrgCudUzvoF5Sj7KUkUIHC80HEohIHV0rlJ0ayKJt7yUN+H0keileCd6vpFK3P68uz 8DR38x/NtkJdCiI4Ki6gSnwX5wReEs55Iuv6fssfshrToES+QhafALxgSaTdGMTlA45t HjqI5VqrQ52phGh1A1tVw4YVoP79A0hHobfyhkXolJwqVK71VXny74MipH3huLkXGZiI FSCR7alI0IDVOocFBypZxOBrCvzHFeBZ1pY0hoGD4azm2urCjEqT9+pZFiGU6cMHUpH8 wYGPuIlP150tZsdYrcTXg0aWkgGBjYzM1QE9F58Z+fKSMB2uIRHpxtGcc7wGrIgD2nkU nQGg== X-Gm-Message-State: ALoCoQm+ErWBKvALEnYCijuxLHJviZF5pdkNAjLkPyPY9lhoHxRiXOLJXloIqeYOgHocSb5GsYtK X-Received: by 10.152.26.225 with SMTP id o1mr1034449lag.4.1411566515315; Wed, 24 Sep 2014 06:48:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.37 with SMTP id a5ls96182laf.42.gmail; Wed, 24 Sep 2014 06:48:35 -0700 (PDT) X-Received: by 10.152.5.168 with SMTP id t8mr6392315lat.67.1411566515147; Wed, 24 Sep 2014 06:48:35 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by mx.google.com with ESMTPS id u7si22902987lau.79.2014.09.24.06.48.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Sep 2014 06:48:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id 10so9971586lbg.24 for ; Wed, 24 Sep 2014 06:48:35 -0700 (PDT) X-Received: by 10.112.200.134 with SMTP id js6mr6352327lbc.0.1411566515049; Wed, 24 Sep 2014 06:48:35 -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 of9csp585137lbb; Wed, 24 Sep 2014 06:48:34 -0700 (PDT) X-Received: by 10.70.126.41 with SMTP id mv9mr10882209pdb.129.1411566512870; Wed, 24 Sep 2014 06:48:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id id8si26374912pad.155.2014.09.24.06.48.32 for ; Wed, 24 Sep 2014 06:48:32 -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 S1753527AbaIXNri (ORCPT + 27 others); Wed, 24 Sep 2014 09:47:38 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:38802 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbaIXNrf (ORCPT ); Wed, 24 Sep 2014 09:47:35 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s8ODlZmc016203; Wed, 24 Sep 2014 08:47:35 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s8ODlZPg004885; Wed, 24 Sep 2014 08:47:35 -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:34 -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 s8ODlKDR015622; Wed, 24 Sep 2014 08:47:33 -0500 From: Kishon Vijay Abraham I To: CC: , Subject: [PATCH 08/22] phy: phy-spear1310-miphy: Use module_platform_driver to register driver. Date: Wed, 24 Sep 2014 19:17:06 +0530 Message-ID: <1411566440-19169-9-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.179 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 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 Signed-off-by: Kishon Vijay Abraham I --- 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 ");