From patchwork Sun Sep 29 06:31:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 20693 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0D03424697 for ; Sun, 29 Sep 2013 06:34:33 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id h10sf3950774vbh.1 for ; Sat, 28 Sep 2013 23:34:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=su6SBKp5soixCGyLTAR4Ze3hH+phn9Fs27lbTRgciXc=; b=Q09jbsFT4wbHfzzGT92fw3Y9lQLctpH7wheizbHpnugqLNMi6cwlCjhR8WC3/6cMvK 5TbottIPTnnge+kEDJ7xIMn31SCw7V69dxS21cx6k4SytlfSe8kHjVi4kJ98PZdCwaLW LrXC0hMCYZ9vo3b1+boaGmSHBGLKtqMAXveQwfeaQb8eTqqlCVjqQN6NoOcBmgdzQjKg qFjcpWnp3/up2xTp6XznkxVPC4zPhNAnxbmk7ezgutLHPeuFKc5Cc1MXjUpx3PzPcD0a /caeEKvI+4+ZsrSCVJZbhelKpXQN84Z1t1C0nMf/jlVK6NuQq7cOXifEeVWcjhdiZJoy x48A== X-Received: by 10.224.2.68 with SMTP id 4mr17824917qai.1.1380436473249; Sat, 28 Sep 2013 23:34:33 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.50.169 with SMTP id d9ls1715174qeo.21.gmail; Sat, 28 Sep 2013 23:34:33 -0700 (PDT) X-Received: by 10.58.46.229 with SMTP id y5mr15488510vem.15.1380436473143; Sat, 28 Sep 2013 23:34:33 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id ur9si4207142veb.41.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Sep 2013 23:34:33 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lc6so2598744vcb.15 for ; Sat, 28 Sep 2013 23:34:03 -0700 (PDT) X-Gm-Message-State: ALoCoQlwqU2WHuKU/JghUphw+phTdhsBztI/ahZPfJ/VGl3hLxXT0PvLgLCRDsdXxjpuwfGkzTZX X-Received: by 10.58.73.202 with SMTP id n10mr15623417vev.7.1380436442889; Sat, 28 Sep 2013 23:34:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp41231vcz; Sat, 28 Sep 2013 23:34:02 -0700 (PDT) X-Received: by 10.68.115.15 with SMTP id jk15mr16999646pbb.36.1380436441947; Sat, 28 Sep 2013 23:34:01 -0700 (PDT) Received: from hanjun-Latitude-D630.domain ([218.17.215.175]) by mx.google.com with ESMTPS id pi7si13883773pbc.81.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Sep 2013 23:34:01 -0700 (PDT) Received-SPF: neutral (google.com: 218.17.215.175 is neither permitted nor denied by best guess record for domain of hanjun@hanjun-latitude-d630.domain) client-ip=218.17.215.175; Received: from hanjun-Latitude-D630 (localhost [127.0.0.1]) by hanjun-Latitude-D630.domain (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id r8T6XXxl008666; Sun, 29 Sep 2013 14:33:33 +0800 Received: (from hanjun@localhost) by hanjun-Latitude-D630 (8.14.4/8.14.4/Submit) id r8T6XPF7008665; Sun, 29 Sep 2013 14:33:25 +0800 From: Hanjun Guo To: "David S. Miller" Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH 1/2] ide / au1xxx-ide: Use module_platform_driver() to simplify code Date: Sun, 29 Sep 2013 14:31:56 +0800 Message-Id: <1380436317-8629-1-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Convert to module_platform_driver() to simplify code. Signed-off-by: Hanjun Guo --- drivers/ide/au1xxx-ide.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/ide/au1xxx-ide.c b/drivers/ide/au1xxx-ide.c index 259786c..bdaf8a5 100644 --- a/drivers/ide/au1xxx-ide.c +++ b/drivers/ide/au1xxx-ide.c @@ -591,19 +591,7 @@ static struct platform_driver au1200_ide_driver = { .probe = au_ide_probe, .remove = au_ide_remove, }; - -static int __init au_ide_init(void) -{ - return platform_driver_register(&au1200_ide_driver); -} - -static void __exit au_ide_exit(void) -{ - platform_driver_unregister(&au1200_ide_driver); -} +module_paltform_driver(au1200_ide_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("AU1200 IDE driver"); - -module_init(au_ide_init); -module_exit(au_ide_exit);