From patchwork Wed Oct 10 18:30:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas KANDAGATLA X-Patchwork-Id: 1575251 Return-Path: X-Original-To: patchwork-linux-omap@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 129F2DFB34 for ; Wed, 10 Oct 2012 18:31:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813Ab2JJSbn (ORCPT ); Wed, 10 Oct 2012 14:31:43 -0400 Received: from eu1sys200aog118.obsmtp.com ([207.126.144.145]:49575 "EHLO eu1sys200aog118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752293Ab2JJSbn (ORCPT ); Wed, 10 Oct 2012 14:31:43 -0400 Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob118.postini.com ([207.126.147.11]) with SMTP ID DSNKUHW/AqAf1k8R0yF8W+blrWr1bHWUm8Un@postini.com; Wed, 10 Oct 2012 18:31:42 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0F92C199; Wed, 10 Oct 2012 18:31:28 +0000 (GMT) Received: from mail7.sgp.st.com (mail7.sgp.st.com [164.129.223.81]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9EDC02624; Wed, 10 Oct 2012 18:31:28 +0000 (GMT) Received: from localhost (king.bri.st.com [10.65.51.147]) by mail7.sgp.st.com (MOS 4.3.3-GA) with ESMTP id APB70853 (AUTH srinivak); Wed, 10 Oct 2012 20:31:27 +0200 From: Srinivas KANDAGATLA To: paul@pwsan.com, rnayak@ti.com Cc: srinivas.kandagatla@st.com, Hiroshi.DOYU@nokia.com, tony@atomide.com, linux-omap@vger.kernel.org, tarun.kanti@ti.com, thara@ti.com, grinberg@compulab.co.il, eric.y.miao@gmail.com, linux-arm-kernel@lists.infradead.org, juha.yrjola@nokia.com Subject: [PATCH 3.6.0- 2/6] ARM/omap2: use module_platform_driver macro Date: Wed, 10 Oct 2012 19:30:17 +0100 Message-Id: <1349893817-7406-1-git-send-email-srinivas.kandagatla@st.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Srinivas Kandagatla This patch removes some code duplication by using module_platform_driver. Signed-off-by: Srinivas Kandagatla --- arch/arm/mach-omap2/mailbox.c | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 0d97456..eb64ca9 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -409,19 +409,7 @@ static struct platform_driver omap2_mbox_driver = { .name = "omap-mailbox", }, }; - -static int __init omap2_mbox_init(void) -{ - return platform_driver_register(&omap2_mbox_driver); -} - -static void __exit omap2_mbox_exit(void) -{ - platform_driver_unregister(&omap2_mbox_driver); -} - -module_init(omap2_mbox_init); -module_exit(omap2_mbox_exit); +module_platform_driver(omap2_mbox_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("omap mailbox: omap2/3/4 architecture specific functions");