From patchwork Fri Mar 15 09:00:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 2275441 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 795794020C for ; Fri, 15 Mar 2013 09:00:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753949Ab3COJAq (ORCPT ); Fri, 15 Mar 2013 05:00:46 -0400 Received: from mail-ea0-f181.google.com ([209.85.215.181]:34625 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753895Ab3COJAa (ORCPT ); Fri, 15 Mar 2013 05:00:30 -0400 Received: by mail-ea0-f181.google.com with SMTP id z10so1374944ead.12 for ; Fri, 15 Mar 2013 02:00:23 -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; bh=RkodZ/tsNC9Pku9EkxH6GQ8VOmJeAZ23XmB9LVwAhF0=; b=HpCE0kd7YkeFQgBpCqxfTpS6RSt3JbJPbPxAicV1VIBjDbtN3cMtPkzoXaKfYWeTdF RvAs8SnMrVSA9Ux9HFPNsHlYWZnMqXzKVtmuRncH8kx59+4ozqgkl10QmYks1cPt6t0r JgXDxs/1vmV2vCcaDbjgFj25zCNYLBHx1lRmb4VTa59czcUzIB2vHGD9sjyPjghQ2cez Zk33ZRZexMdxTKX6/foe5vbENJf3Vk+cEig5Reh2KBKDJYqxiGjc4HOAM++oOUmqeOx+ 9WDvT7WYGHnfriO4XEckBxVK/5UiP0sOhudvzcfCCUTQWxXE722PMAyi+4bvSf16NHQj U6Dg== X-Received: by 10.14.4.69 with SMTP id 45mr16302166eei.0.1363338023447; Fri, 15 Mar 2013 02:00:23 -0700 (PDT) Received: from ld2036.tmt.telital.com ([213.205.6.118]) by mx.google.com with ESMTPS id t4sm8614890eel.0.2013.03.15.02.00.21 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Mar 2013 02:00:22 -0700 (PDT) From: Fabio Porcedda To: linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org Cc: Florian Tobias Schandinat , Nicolas Ferre , Tomi Valkeinen , David Howells , Geert Uytterhoeven , Laurent Pinchart , Kuninori Morimoto Subject: [PATCH v3] drivers: video: use module_platform_driver_probe() Date: Fri, 15 Mar 2013 10:00:19 +0100 Message-Id: <1363338019-13092-1-git-send-email-fabio.porcedda@gmail.com> X-Mailer: git-send-email 1.8.1.5 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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: Florian Tobias Schandinat Cc: Nicolas Ferre Cc: Tomi Valkeinen Cc: David Howells Cc: Geert Uytterhoeven Cc: Laurent Pinchart Cc: Kuninori Morimoto Acked-by: Nicolas Ferre Acked-by: Laurent Pinchart --- Notes: v3: - add missing drivers: amifb, atmel_lcdfb, vrfb - split patch set to each maintainer to easy up respin v2: - rebased over linux-next and remove already converted drivers drivers/video/amifb.c | 14 +------------- drivers/video/atmel_lcdfb.c | 13 +------------ drivers/video/omap2/vrfb.c | 13 +------------ drivers/video/sh_mipi_dsi.c | 12 +----------- drivers/video/sh_mobile_hdmi.c | 12 +----------- 5 files changed, 5 insertions(+), 59 deletions(-) diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index 7fa1bf8..03e2de2 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c @@ -3788,19 +3788,7 @@ static struct platform_driver amifb_driver = { }, }; -static int __init amifb_init(void) -{ - return platform_driver_probe(&amifb_driver, amifb_probe); -} - -module_init(amifb_init); - -static void __exit amifb_exit(void) -{ - platform_driver_unregister(&amifb_driver); -} - -module_exit(amifb_exit); +return module_platform_driver_probe(amifb_driver, amifb_probe); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:amiga-video"); diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 12cf5f3..654e102 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -1150,18 +1150,7 @@ static struct platform_driver atmel_lcdfb_driver = { }, }; -static int __init atmel_lcdfb_init(void) -{ - return platform_driver_probe(&atmel_lcdfb_driver, atmel_lcdfb_probe); -} - -static void __exit atmel_lcdfb_exit(void) -{ - platform_driver_unregister(&atmel_lcdfb_driver); -} - -module_init(atmel_lcdfb_init); -module_exit(atmel_lcdfb_exit); +module_platform_driver_probe(atmel_lcdfb_driver, atmel_lcdfb_probe); MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver"); MODULE_AUTHOR("Nicolas Ferre "); diff --git a/drivers/video/omap2/vrfb.c b/drivers/video/omap2/vrfb.c index 10560ef..5261229 100644 --- a/drivers/video/omap2/vrfb.c +++ b/drivers/video/omap2/vrfb.c @@ -397,18 +397,7 @@ static struct platform_driver vrfb_driver = { .remove = __exit_p(vrfb_remove), }; -static int __init vrfb_init(void) -{ - return platform_driver_probe(&vrfb_driver, &vrfb_probe); -} - -static void __exit vrfb_exit(void) -{ - platform_driver_unregister(&vrfb_driver); -} - -module_init(vrfb_init); -module_exit(vrfb_exit); +module_platform_driver_probe(vrfb_driver, vrfb_probe); MODULE_AUTHOR("Tomi Valkeinen "); MODULE_DESCRIPTION("OMAP VRFB"); 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");