From patchwork Thu Mar 14 13:11:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 227656 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 7296E2C0092 for ; Fri, 15 Mar 2013 00:13:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756017Ab3CNNMw (ORCPT ); Thu, 14 Mar 2013 09:12:52 -0400 Received: from mail-ee0-f44.google.com ([74.125.83.44]:44853 "EHLO mail-ee0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757869Ab3CNNMP (ORCPT ); Thu, 14 Mar 2013 09:12:15 -0400 Received: by mail-ee0-f44.google.com with SMTP id l10so1014043eei.17 for ; Thu, 14 Mar 2013 06:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=HTlOIX60unZ6j3zCdasKEAaCg99Jsp52gIsaKnJzHS4=; b=EfgE9r/GT6HJvZ+DNslC9486z5sSxBIjgpb5A8plQxsli4WOZMg8lXJYi2mNv1hmC/ vz22TFTQulLx9lAkBOWSlTTOJnemK/EwfAp0yf07sYdIquRp2epyarRPmOXUhZKT5UL3 lt3CWnsW3GlvpFC/dXK/rXeV8/moQ7CF+rhKRU5gLntXVLyyY7OE9OvuFVLpcmFpMyDY p8GqW5VgcI8N4ZcvMZMvuUsJm/e0YILxYRjuGksPgqmhvLwSg9+PUq4GDEBpGNTGu5+C JVGdspF92NeEv3LB1aEU8gEZ4fwBvX71NQK5g9qbt0Nu8zVjjjYhvrV7Jw6BP8pSN3Jk UfIw== X-Received: by 10.14.179.5 with SMTP id g5mr6606016eem.41.1363266732938; Thu, 14 Mar 2013 06:12:12 -0700 (PDT) Received: from ld2036.tmt.telital.com ([213.205.6.118]) by mx.google.com with ESMTPS id q42sm3535083eem.14.2013.03.14.06.12.11 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Mar 2013 06:12:12 -0700 (PDT) From: Fabio Porcedda To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-ide@vger.kernel.org, lm-sensors@lm-sensors.org, linux-input@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Greg Kroah-Hartman , Richard Purdie , Florian Tobias Schandinat Subject: [PATCH 09/10] drivers: video: use module_platform_driver_probe() Date: Thu, 14 Mar 2013 14:11:30 +0100 Message-Id: <1363266691-15757-11-git-send-email-fabio.porcedda@gmail.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1363266691-15757-1-git-send-email-fabio.porcedda@gmail.com> References: <1363266691-15757-1-git-send-email-fabio.porcedda@gmail.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org This patch converts the drivers to use the module_platform_driver_probe() macro which makes the code smaller and a bit simpler. Signed-off-by: Fabio Porcedda Cc: Greg Kroah-Hartman Cc: Richard Purdie Cc: Florian Tobias Schandinat Cc: linux-fbdev@vger.kernel.org --- drivers/video/backlight/atmel-pwm-bl.c | 12 +----------- drivers/video/sh_mipi_dsi.c | 12 +----------- drivers/video/sh_mobile_hdmi.c | 12 +----------- 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/drivers/video/backlight/atmel-pwm-bl.c b/drivers/video/backlight/atmel-pwm-bl.c index de5e5e7..20b330d 100644 --- a/drivers/video/backlight/atmel-pwm-bl.c +++ b/drivers/video/backlight/atmel-pwm-bl.c @@ -225,17 +225,7 @@ static struct platform_driver atmel_pwm_bl_driver = { .remove = __exit_p(atmel_pwm_bl_remove), }; -static int __init atmel_pwm_bl_init(void) -{ - return platform_driver_probe(&atmel_pwm_bl_driver, atmel_pwm_bl_probe); -} -module_init(atmel_pwm_bl_init); - -static void __exit atmel_pwm_bl_exit(void) -{ - platform_driver_unregister(&atmel_pwm_bl_driver); -} -module_exit(atmel_pwm_bl_exit); +module_platform_driver_probe(atmel_pwm_bl_driver, atmel_pwm_bl_probe); MODULE_AUTHOR("Hans-Christian egtvedt "); MODULE_DESCRIPTION("Atmel PWM backlight driver"); diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c index 701b461..6cad530 100644 --- a/drivers/video/sh_mipi_dsi.c +++ b/drivers/video/sh_mipi_dsi.c @@ -581,17 +581,7 @@ static struct platform_driver sh_mipi_driver = { }, }; -static int __init sh_mipi_init(void) -{ - return platform_driver_probe(&sh_mipi_driver, sh_mipi_probe); -} -module_init(sh_mipi_init); - -static void __exit sh_mipi_exit(void) -{ - platform_driver_unregister(&sh_mipi_driver); -} -module_exit(sh_mipi_exit); +module_platform_driver_probe(sh_mipi_driver, sh_mipi_probe); MODULE_AUTHOR("Guennadi Liakhovetski "); MODULE_DESCRIPTION("SuperH / ARM-shmobile MIPI DSI driver"); diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c index 930e550..bfe4728 100644 --- a/drivers/video/sh_mobile_hdmi.c +++ b/drivers/video/sh_mobile_hdmi.c @@ -1445,17 +1445,7 @@ static struct platform_driver sh_hdmi_driver = { }, }; -static int __init sh_hdmi_init(void) -{ - return platform_driver_probe(&sh_hdmi_driver, sh_hdmi_probe); -} -module_init(sh_hdmi_init); - -static void __exit sh_hdmi_exit(void) -{ - platform_driver_unregister(&sh_hdmi_driver); -} -module_exit(sh_hdmi_exit); +module_platform_driver_probe(sh_hdmi_driver, sh_hdmi_probe); MODULE_AUTHOR("Guennadi Liakhovetski "); MODULE_DESCRIPTION("SuperH / ARM-shmobile HDMI driver");