From patchwork Wed Oct 3 13:26:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 1541521 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 6ABD6DFFEE for ; Wed, 3 Oct 2012 13:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755130Ab2JCN0o (ORCPT ); Wed, 3 Oct 2012 09:26:44 -0400 Received: from mga03.intel.com ([143.182.124.21]:42591 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755132Ab2JCN0o (ORCPT ); Wed, 3 Oct 2012 09:26:44 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 03 Oct 2012 06:26:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,528,1344236400"; d="scan'208";a="200047273" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.62]) by azsmga001.ch.intel.com with ESMTP; 03 Oct 2012 06:26:42 -0700 Received: from andy by smile with local (Exim 4.80) (envelope-from ) id 1TJOyF-00050C-35; Wed, 03 Oct 2012 16:26:39 +0300 From: Andy Shevchenko To: Chris Ball , linux-mmc@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH 2/2] mmc: dw_mmc: use helper macro module_platform_driver() Date: Wed, 3 Oct 2012 16:26:37 +0300 Message-Id: <1349270797-19189-2-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1349270797-19189-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1349270797-19189-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Since v3.2 we have nice macro to define the platform driver's init and exit calls. This patch simplifies the dw_mmc platform driver by using that macro. Signed-off-by: Andy Shevchenko Acked-by: Will Newton --- drivers/mmc/host/dw_mmc-pltfm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index 777c585..779335b 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c @@ -119,6 +119,7 @@ static const struct of_device_id dw_mci_pltfm_match[] = { MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match); static struct platform_driver dw_mci_pltfm_driver = { + .probe = dw_mci_pltfm_probe, .remove = __devexit_p(dw_mci_pltfm_remove), .driver = { .name = "dw_mmc", @@ -127,18 +128,7 @@ static struct platform_driver dw_mci_pltfm_driver = { }, }; -static int __init dw_mci_init(void) -{ - return platform_driver_probe(&dw_mci_pltfm_driver, dw_mci_pltfm_probe); -} - -static void __exit dw_mci_exit(void) -{ - platform_driver_unregister(&dw_mci_pltfm_driver); -} - -module_init(dw_mci_init); -module_exit(dw_mci_exit); +module_platform_driver(dw_mci_pltfm_driver); MODULE_DESCRIPTION("DW Multimedia Card Interface driver"); MODULE_AUTHOR("NXP Semiconductor VietNam");