From patchwork Sun Sep 29 06:31:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 20694 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC7FE24697 for ; Sun, 29 Sep 2013 06:35:24 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id b4sf4017906qen.9 for ; Sat, 28 Sep 2013 23:35:24 -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:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=4jhHOx4sLpvDylUlNRiOEq5gVggfmF/canus6BVk/PE=; b=BOiuZyz7khuZ9YyNQtSpytB6875IqU6EvgxGY1FuSwIqDtJEfgv/xFUCOfqEbWZnf8 II9k/m6a2W6uFDDNMISRnQvIDqveC65yLN48FrYdqRTF8r1pCSCSp2vYedKkVEufQpp7 dKo0v7dir+3PZQZAPqmrKCs6t3CW/pLV64T5Z99t4948e2Uiv9AZEKwYCHb2ql2NMttd Nqf3dLm12maTvjZQotxLrtHZF9AkxVq+fsQwbA8ifVodomZkQ0Shs6S1VFRJLAdw9fzx G+5JcB1qv5yn64jPHdfCGpCWTdGpWdve3LZ2j2QDXKmp+7UCqbkPkIpyGYHSP+Rjz27U GA+w== X-Received: by 10.224.126.137 with SMTP id c9mr17512943qas.2.1380436524672; Sat, 28 Sep 2013 23:35:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.1.65 with SMTP id 1ls1664424qek.72.gmail; Sat, 28 Sep 2013 23:35:24 -0700 (PDT) X-Received: by 10.52.65.136 with SMTP id x8mr13290666vds.23.1380436524607; Sat, 28 Sep 2013 23:35:24 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id zw10si4188904vdb.109.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Sep 2013 23:35:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 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.182; Received: by mail-vc0-f182.google.com with SMTP id hf12so3039759vcb.27 for ; Sat, 28 Sep 2013 23:34:54 -0700 (PDT) X-Gm-Message-State: ALoCoQkHHobuu/3Z66xSNzW9kjupTPBMP3R3KXOCawPO09naIvJA7ATVOuS2NG7CAX0X8d5IjtEX X-Received: by 10.58.168.205 with SMTP id zy13mr15601768veb.19.1380436494527; Sat, 28 Sep 2013 23:34:54 -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 u4csp41251vcz; Sat, 28 Sep 2013 23:34:53 -0700 (PDT) X-Received: by 10.66.142.230 with SMTP id rz6mr21191390pab.117.1380436493592; Sat, 28 Sep 2013 23:34:53 -0700 (PDT) Received: from hanjun-Latitude-D630.domain ([218.17.215.175]) by mx.google.com with ESMTPS id vs7si13869264pbc.115.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Sep 2013 23:34:53 -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 r8T6YbiT008671; Sun, 29 Sep 2013 14:34:37 +0800 Received: (from hanjun@localhost) by hanjun-Latitude-D630 (8.14.4/8.14.4/Submit) id r8T6Yb3o008669; Sun, 29 Sep 2013 14:34:37 +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 2/2] ide / ide_platform: Use module_platform_driver() to simplify code Date: Sun, 29 Sep 2013 14:31:57 +0800 Message-Id: <1380436317-8629-2-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380436317-8629-1-git-send-email-hanjun.guo@linaro.org> References: <1380436317-8629-1-git-send-email-hanjun.guo@linaro.org> 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.182 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/ide_platform.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/ide/ide_platform.c b/drivers/ide/ide_platform.c index a8b4b6a..799d0c6 100644 --- a/drivers/ide/ide_platform.c +++ b/drivers/ide/ide_platform.c @@ -130,20 +130,8 @@ static struct platform_driver platform_ide_driver = { .probe = plat_ide_probe, .remove = plat_ide_remove, }; - -static int __init platform_ide_init(void) -{ - return platform_driver_register(&platform_ide_driver); -} - -static void __exit platform_ide_exit(void) -{ - platform_driver_unregister(&platform_ide_driver); -} +module_platform_driver(platform_ide_driver); MODULE_DESCRIPTION("Platform IDE driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:pata_platform"); - -module_init(platform_ide_init); -module_exit(platform_ide_exit);