From patchwork Sun Sep 29 05:32:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 20685 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f199.google.com (mail-gg0-f199.google.com [209.85.161.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1F01E24687 for ; Sun, 29 Sep 2013 05:39:50 +0000 (UTC) Received: by mail-gg0-f199.google.com with SMTP id h3sf796992gge.2 for ; Sat, 28 Sep 2013 22:39:49 -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=JVMOw+hMxNqorEVONSWL+SiYjfuWC5XMB8eF0XvnI88=; b=SE2ptPw1RLY4AmruONTUvpWA5IYHLJ6UO3kUszEWqEn8899Z1SlN2JsZUqY4yZqcDD 2EMKQ95CGjjEcSmJQIKhFJcK/ng3kig0HCNLfQZXBM1kCH3XPhhNXJzqDj3wDB/ubICd DVo30X8Iebf7DKs0DMbPHJaTLaA4746RmLDbxQ+MhQhCTROMDyL4bj4oCFNbw37X940B X3KJ6lxXLO14WYetCDVdnrJR1xNWP3OwRQgx7fVdbIKBo6DmS0N/XFRWyJFBGosMfUMW 6sbhuzNyf113YTxDUXqDdk2PLHugE32/2Q1iqfmYmVS69U0npSGYLGlMIasFDGR0x32J J9YA== X-Received: by 10.224.93.19 with SMTP id t19mr4918243qam.3.1380433189895; Sat, 28 Sep 2013 22:39:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.2.166 with SMTP id 6ls1723952qev.69.gmail; Sat, 28 Sep 2013 22:39:49 -0700 (PDT) X-Received: by 10.58.161.116 with SMTP id xr20mr15250997veb.2.1380433189815; Sat, 28 Sep 2013 22:39:49 -0700 (PDT) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id cl2si4148730vdc.114.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Sep 2013 22:39:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.47; Received: by mail-vb0-f47.google.com with SMTP id h10so2886221vbh.34 for ; Sat, 28 Sep 2013 22:39:19 -0700 (PDT) X-Gm-Message-State: ALoCoQnQPmMztghluCC0TVkV5+e3hcLcJOVA3E1piRgIqJimroQMyGo2N3KBGaSebcXDuK/fLvKm X-Received: by 10.52.33.44 with SMTP id o12mr12958559vdi.7.1380433159722; Sat, 28 Sep 2013 22:39:19 -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 u4csp39567vcz; Sat, 28 Sep 2013 22:39:19 -0700 (PDT) X-Received: by 10.68.189.5 with SMTP id ge5mr16850445pbc.42.1380433158874; Sat, 28 Sep 2013 22:39:18 -0700 (PDT) Received: from hanjun-Latitude-D630.domain ([218.17.215.175]) by mx.google.com with ESMTPS id mo9si13667508pbc.216.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 28 Sep 2013 22:39:18 -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 r8T5bd8m007317; Sun, 29 Sep 2013 13:37:39 +0800 Received: (from hanjun@localhost) by hanjun-Latitude-D630 (8.14.4/8.14.4/Submit) id r8T5bcpS007316; Sun, 29 Sep 2013 13:37:38 +0800 From: Hanjun Guo To: Tomi Valkeinen , Jean-Christophe Plagniol-Villard Cc: linux-fbdev@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 03/10] Video / metronomefb: Use module_platform_driver() to simplify code Date: Sun, 29 Sep 2013 13:32:03 +0800 Message-Id: <1380432730-7263-4-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380432730-7263-1-git-send-email-hanjun.guo@linaro.org> References: <1380432730-7263-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.212.47 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/video/metronomefb.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/video/metronomefb.c b/drivers/video/metronomefb.c index f30150d..2d7dd8e 100644 --- a/drivers/video/metronomefb.c +++ b/drivers/video/metronomefb.c @@ -769,23 +769,11 @@ static struct platform_driver metronomefb_driver = { .name = "metronomefb", }, }; - -static int __init metronomefb_init(void) -{ - return platform_driver_register(&metronomefb_driver); -} - -static void __exit metronomefb_exit(void) -{ - platform_driver_unregister(&metronomefb_driver); -} +module_platform_driver(metronomefb_driver); module_param(user_wfm_size, uint, 0); MODULE_PARM_DESC(user_wfm_size, "Set custom waveform size"); -module_init(metronomefb_init); -module_exit(metronomefb_exit); - MODULE_DESCRIPTION("fbdev driver for Metronome controller"); MODULE_AUTHOR("Jaya Kumar"); MODULE_LICENSE("GPL");