From patchwork Wed Sep 5 09:39:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 11189 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id BAF7923EFF for ; Wed, 5 Sep 2012 09:42:18 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id B05B4A188B2 for ; Wed, 5 Sep 2012 09:41:25 +0000 (UTC) Received: by ieak11 with SMTP id k11so636023iea.11 for ; Wed, 05 Sep 2012 02:42:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=JNXtHbLOy7y/7aqNDDty0kPQvSg8rgYa8nzLxRFDp84=; b=HqHopK9fyqtO3jgWbMPtM6Wnk2c7ioQxl/tyMciV+otQxDuXyIjCmLwjeqPIwDVA6x LM4isa6n2cqvNDu/ci+VUIQRqn+BiFAWPiGzOmBqH9flNYytJkjvIpaTkEj0agixQG5P aV2dtN9NhYGmFlf+l2dODy/pt8M1i/CHyUidJYsynUYKjtqMcA/QRuIcqyMD6f2VU0Ox 7m7OkuJtMpGAiTvh9UC4PmncNWjXB+EZC8P04tqBPaGcA9ahEEqeUHEKtMNmT9GQfh/y fT1M/bPMumP6X/nAoPfK+sUtnsQGU9CeJEEGdrIogB1t+khSUVk+m9s84lt56QUbxxRk eCfQ== Received: by 10.50.207.106 with SMTP id lv10mr17304545igc.0.1346838137893; Wed, 05 Sep 2012 02:42:17 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp242920igc; Wed, 5 Sep 2012 02:42:17 -0700 (PDT) Received: by 10.68.201.104 with SMTP id jz8mr49475036pbc.141.1346838136965; Wed, 05 Sep 2012 02:42:16 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id sb7si1809410pbc.31.2012.09.05.02.42.16 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 02:42:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by pbcmd12 with SMTP id md12so729191pbc.37 for ; Wed, 05 Sep 2012 02:42:16 -0700 (PDT) Received: by 10.68.239.164 with SMTP id vt4mr53652579pbc.118.1346838136468; Wed, 05 Sep 2012 02:42:16 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id gt2sm1049314pbc.62.2012.09.05.02.42.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 02:42:15 -0700 (PDT) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/2] ARM: S3C24XX: Use module_platform_driver macro in h1940-bluetooth.c Date: Wed, 5 Sep 2012 15:09:28 +0530 Message-Id: <1346837969-11344-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQkmhwD6TlIb1JTHZrjen34EqjS3d2JOYqBSjdiwGtq9mU7u6mKnqGNhb45DhKWN4VW7Ok2S module_platform_driver simplifies the code by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat --- arch/arm/mach-s3c24xx/h1940-bluetooth.c | 14 +------------- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c24xx/h1940-bluetooth.c index a5eeb62..57aee91 100644 --- a/arch/arm/mach-s3c24xx/h1940-bluetooth.c +++ b/arch/arm/mach-s3c24xx/h1940-bluetooth.c @@ -138,19 +138,7 @@ static struct platform_driver h1940bt_driver = { .remove = h1940bt_remove, }; - -static int __init h1940bt_init(void) -{ - return platform_driver_register(&h1940bt_driver); -} - -static void __exit h1940bt_exit(void) -{ - platform_driver_unregister(&h1940bt_driver); -} - -module_init(h1940bt_init); -module_exit(h1940bt_exit); +module_platform_driver(h1940bt_driver); MODULE_AUTHOR("Arnaud Patard "); MODULE_DESCRIPTION("Driver for the iPAQ H1940 bluetooth chip");