* Re: [PATCH] ARM: video: mxs: Fix mxsfb misconfiguring VDCTRL0
From: Fabio Estevam @ 2013-03-16 22:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1363471581-10132-1-git-send-email-marex@denx.de>
On Sat, Mar 16, 2013 at 7:06 PM, Marek Vasut <marex@denx.de> wrote:
> The issue fixed by this patch manifests only then using X11
> with mxsfb driver. The X11 will display either shifted image
> or otherwise distorted image on the LCD.
>
> The problem is that the X11 tries to reconfigure the framebuffer
> and along the way call fb_ops.fb_set_par() with it's configuration
> values. The field of particular interest is fb_info->var.sync which
> contains non-standard values if configured by kernel. These are
> FB_SYNC_DATA_ENABLE_HIGH_ACT and FB_SYNC_DOTCLK_FAILING_ACT defined
> in include/linux/mxsfb.h . The driver interprets those and configures
> the LCD controller accordingly. Yet X11 only has access to standard
> values for this field defined in include/uapi/linux/fb.h and thus
> omits these special values. This results in distorted image on the
> LCD.
>
> This patch moves these non-standard values into new field of the
> mxsfb_platform_data structure so the driver can in turn check this
> field instead of the video mode field for these specific portions.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estavem@freescale.com>
> Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>
> Cc: Linux FBDEV <linux-fbdev@vger.kernel.org>
> Cc: Lothar Waßmann <LW@karo-electronics.de>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: Shawn Guo <shawn.guo@linaro.org>
This fixes the X11 offset issue on my mx28evk, thanks!
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
^ permalink raw reply
* [PATCH] ARM: video: mxs: Fix mxsfb misconfiguring VDCTRL0
From: Marek Vasut @ 2013-03-16 22:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAOMZO5CDuODRrJEEaDKm5nepfkuvuF77ZQmarB69hL6gg386ww@mail.gmail.com>
The issue fixed by this patch manifests only then using X11
with mxsfb driver. The X11 will display either shifted image
or otherwise distorted image on the LCD.
The problem is that the X11 tries to reconfigure the framebuffer
and along the way call fb_ops.fb_set_par() with it's configuration
values. The field of particular interest is fb_info->var.sync which
contains non-standard values if configured by kernel. These are
FB_SYNC_DATA_ENABLE_HIGH_ACT and FB_SYNC_DOTCLK_FAILING_ACT defined
in include/linux/mxsfb.h . The driver interprets those and configures
the LCD controller accordingly. Yet X11 only has access to standard
values for this field defined in include/uapi/linux/fb.h and thus
omits these special values. This results in distorted image on the
LCD.
This patch moves these non-standard values into new field of the
mxsfb_platform_data structure so the driver can in turn check this
field instead of the video mode field for these specific portions.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estavem@freescale.com>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>
Cc: Linux FBDEV <linux-fbdev@vger.kernel.org>
Cc: Lothar Waßmann <LW@karo-electronics.de>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-mxs/mach-mxs.c | 22 +++++++++++-----------
drivers/video/mxsfb.c | 7 +++++--
include/linux/mxsfb.h | 7 +++++--
3 files changed, 21 insertions(+), 15 deletions(-)
NOTE: We ought to get rid of this platform data goo, but we can't do
it in here. This is a bugfix.
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index c66129b..ebf592c 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -41,8 +41,6 @@ static struct fb_videomode mx23evk_video_modes[] = {
.lower_margin = 4,
.hsync_len = 1,
.vsync_len = 1,
- .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT |
- FB_SYNC_DOTCLK_FAILING_ACT,
},
};
@@ -59,8 +57,6 @@ static struct fb_videomode mx28evk_video_modes[] = {
.lower_margin = 10,
.hsync_len = 10,
.vsync_len = 10,
- .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT |
- FB_SYNC_DOTCLK_FAILING_ACT,
},
};
@@ -77,7 +73,6 @@ static struct fb_videomode m28evk_video_modes[] = {
.lower_margin = 45,
.hsync_len = 1,
.vsync_len = 1,
- .sync = FB_SYNC_DATA_ENABLE_HIGH_ACT,
},
};
@@ -94,9 +89,7 @@ static struct fb_videomode apx4devkit_video_modes[] = {
.lower_margin = 13,
.hsync_len = 48,
.vsync_len = 3,
- .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT |
- FB_SYNC_DATA_ENABLE_HIGH_ACT |
- FB_SYNC_DOTCLK_FAILING_ACT,
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
},
};
@@ -113,9 +106,7 @@ static struct fb_videomode apf28dev_video_modes[] = {
.lower_margin = 0x15,
.hsync_len = 64,
.vsync_len = 4,
- .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT |
- FB_SYNC_DATA_ENABLE_HIGH_ACT |
- FB_SYNC_DOTCLK_FAILING_ACT,
+ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
},
};
@@ -250,6 +241,8 @@ static void __init imx23_evk_init(void)
mxsfb_pdata.mode_count = ARRAY_SIZE(mx23evk_video_modes);
mxsfb_pdata.default_bpp = 32;
mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
+ mxsfb_pdata.sync = MXSFB_SYNC_DATA_ENABLE_HIGH_ACT |
+ MXSFB_SYNC_DOTCLK_FAILING_ACT;
}
static inline void enable_clk_enet_out(void)
@@ -269,6 +262,8 @@ static void __init imx28_evk_init(void)
mxsfb_pdata.mode_count = ARRAY_SIZE(mx28evk_video_modes);
mxsfb_pdata.default_bpp = 32;
mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
+ mxsfb_pdata.sync = MXSFB_SYNC_DATA_ENABLE_HIGH_ACT |
+ MXSFB_SYNC_DOTCLK_FAILING_ACT;
mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
}
@@ -288,6 +283,7 @@ static void __init m28evk_init(void)
mxsfb_pdata.mode_count = ARRAY_SIZE(m28evk_video_modes);
mxsfb_pdata.default_bpp = 16;
mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT;
+ mxsfb_pdata.sync = MXSFB_SYNC_DATA_ENABLE_HIGH_ACT;
}
static void __init sc_sps1_init(void)
@@ -313,6 +309,8 @@ static void __init apx4devkit_init(void)
mxsfb_pdata.mode_count = ARRAY_SIZE(apx4devkit_video_modes);
mxsfb_pdata.default_bpp = 32;
mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
+ mxsfb_pdata.sync = MXSFB_SYNC_DATA_ENABLE_HIGH_ACT |
+ MXSFB_SYNC_DOTCLK_FAILING_ACT;
}
#define ENET0_MDC__GPIO_4_0 MXS_GPIO_NR(4, 0)
@@ -403,6 +401,8 @@ static void __init apf28_init(void)
mxsfb_pdata.mode_count = ARRAY_SIZE(apf28dev_video_modes);
mxsfb_pdata.default_bpp = 16;
mxsfb_pdata.ld_intf_width = STMLCDIF_16BIT;
+ mxsfb_pdata.sync = MXSFB_SYNC_DATA_ENABLE_HIGH_ACT |
+ MXSFB_SYNC_DOTCLK_FAILING_ACT;
}
static void __init mxs_machine_init(void)
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 755556c..45169cb 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -169,6 +169,7 @@ struct mxsfb_info {
unsigned dotclk_delay;
const struct mxsfb_devdata *devdata;
int mapped;
+ u32 sync;
};
#define mxsfb_is_v3(host) (host->devdata->ipversion = 3)
@@ -456,9 +457,9 @@ static int mxsfb_set_par(struct fb_info *fb_info)
vdctrl0 |= VDCTRL0_HSYNC_ACT_HIGH;
if (fb_info->var.sync & FB_SYNC_VERT_HIGH_ACT)
vdctrl0 |= VDCTRL0_VSYNC_ACT_HIGH;
- if (fb_info->var.sync & FB_SYNC_DATA_ENABLE_HIGH_ACT)
+ if (host->sync & MXSFB_SYNC_DATA_ENABLE_HIGH_ACT)
vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH;
- if (fb_info->var.sync & FB_SYNC_DOTCLK_FAILING_ACT)
+ if (host->sync & MXSFB_SYNC_DOTCLK_FAILING_ACT)
vdctrl0 |= VDCTRL0_DOTCLK_ACT_FAILING;
writel(vdctrl0, host->base + LCDC_VDCTRL0);
@@ -861,6 +862,8 @@ static int mxsfb_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&fb_info->modelist);
+ host->sync = pdata->sync;
+
ret = mxsfb_init_fbinfo(host);
if (ret != 0)
goto error_init_fb;
diff --git a/include/linux/mxsfb.h b/include/linux/mxsfb.h
index f14943d..f80af86 100644
--- a/include/linux/mxsfb.h
+++ b/include/linux/mxsfb.h
@@ -24,8 +24,8 @@
#define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */
#define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */
-#define FB_SYNC_DATA_ENABLE_HIGH_ACT (1 << 6)
-#define FB_SYNC_DOTCLK_FAILING_ACT (1 << 7) /* failing/negtive edge sampling */
+#define MXSFB_SYNC_DATA_ENABLE_HIGH_ACT (1 << 6)
+#define MXSFB_SYNC_DOTCLK_FAILING_ACT (1 << 7) /* failing/negtive edge sampling */
struct mxsfb_platform_data {
struct fb_videomode *mode_list;
@@ -44,6 +44,9 @@ struct mxsfb_platform_data {
* allocated. If specified,fb_size must also be specified.
* fb_phys must be unused by Linux.
*/
+ u32 sync; /* sync mask, contains MXSFB specifics not
+ * carried in fb_info->var.sync
+ */
};
#endif /* __LINUX_MXSFB_H */
--
1.7.10.4
^ permalink raw reply related
* Re: Shifted framebuffer after X11 starts on mx28
From: Marek Vasut @ 2013-03-16 21:00 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <201303162155.28230.marex@denx.de>
Dear Marek Vasut,
> Dear Fabio Estevam,
>
> > Hi,
> >
> > I am running 3.8.2 kernel on a mx28evk and when I start X11 I get a
> > "shifted" framebuffer.
> >
> > The framebuffer works well if X11 is not called.
> >
> > There is no issue with X11 when running with Freescale 2.6.35 kernel.
> >
> > Looking at drivers/video/mxsfb.c there is the following comment:
> > /*
> >
> > * It seems, you can't re-program the controller if it is still running.
> > * This may lead into shifted pictures (FIFO issue?).
> > * So, first stop the controller and drain its FIFOs
> > */
> >
> > So, it looks like that I am still facing this issue when X11 starts.
> >
> > If anyone has any suggestions, please let me know.
>
> This is not it, I almost hunted the bug down. Hang on.
>
> Basically check mxsfb_set_par() and observe fb_info->var.sync . It's set to
> "something" during regular framebuffer operation and it's set to "something
> else" during Xorg operation. And that's what causes it to get broken. I
> forced fb_info->var.sync to the "something" value by hardcoding it in
> kernel just now for a quick test and X works for me.
Uh, being in hacking-mode and replying to email doesn't work well together :-)
In my case, fb_info->var.sync is set to FB_SYNC_DATA_ENABLE_HIGH_ACT during
regular operation (framebuffer console), but if X11 starts, this fb_info-
>var.sync is forced to value 0 which causes the malfunction. Now back into
hacking-mode ;-)
Best regards,
Marek Vasut
^ permalink raw reply
* Re: Shifted framebuffer after X11 starts on mx28
From: Marek Vasut @ 2013-03-16 20:55 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAOMZO5CDuODRrJEEaDKm5nepfkuvuF77ZQmarB69hL6gg386ww@mail.gmail.com>
Dear Fabio Estevam,
> Hi,
>
> I am running 3.8.2 kernel on a mx28evk and when I start X11 I get a
> "shifted" framebuffer.
>
> The framebuffer works well if X11 is not called.
>
> There is no issue with X11 when running with Freescale 2.6.35 kernel.
>
> Looking at drivers/video/mxsfb.c there is the following comment:
>
> /*
> * It seems, you can't re-program the controller if it is still running.
> * This may lead into shifted pictures (FIFO issue?).
> * So, first stop the controller and drain its FIFOs
> */
>
> So, it looks like that I am still facing this issue when X11 starts.
>
> If anyone has any suggestions, please let me know.
This is not it, I almost hunted the bug down. Hang on.
Basically check mxsfb_set_par() and observe fb_info->var.sync . It's set to
"something" during regular framebuffer operation and it's set to "something
else" during Xorg operation. And that's what causes it to get broken. I forced
fb_info->var.sync to the "something" value by hardcoding it in kernel just now
for a quick test and X works for me.
Best regards,
Marek Vasut
^ permalink raw reply
* Shifted framebuffer after X11 starts on mx28
From: Fabio Estevam @ 2013-03-16 20:09 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I am running 3.8.2 kernel on a mx28evk and when I start X11 I get a
"shifted" framebuffer.
The framebuffer works well if X11 is not called.
There is no issue with X11 when running with Freescale 2.6.35 kernel.
Looking at drivers/video/mxsfb.c there is the following comment:
/*
* It seems, you can't re-program the controller if it is still running.
* This may lead into shifted pictures (FIFO issue?).
* So, first stop the controller and drain its FIFOs
*/
So, it looks like that I am still facing this issue when X11 starts.
If anyone has any suggestions, please let me know.
Thanks,
Fabio Estevam
^ permalink raw reply
* [PATCH v2, part3 06/12] mm/acornfb: use common help functions to free reserved pages
From: Jiang Liu @ 2013-03-16 17:03 UTC (permalink / raw)
To: Andrew Morton, David Rientjes
Cc: Jiang Liu, Wen Congyang, Mel Gorman, Minchan Kim,
KAMEZAWA Hiroyuki, Michal Hocko, Jianguo Wu, linux-mm,
linux-kernel, linux-fbdev
In-Reply-To: <1363453413-8139-1-git-send-email-jiang.liu@huawei.com>
Use common help functions to free reserved pages.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Florian Tobias Schandinat
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/video/acornfb.c | 28 ++--------------------------
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index 6488a73..344f2bb 100644
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -1188,32 +1188,8 @@ static int acornfb_detect_monitortype(void)
static inline void
free_unused_pages(unsigned int virtual_start, unsigned int virtual_end)
{
- int mb_freed = 0;
-
- /*
- * Align addresses
- */
- virtual_start = PAGE_ALIGN(virtual_start);
- virtual_end = PAGE_ALIGN(virtual_end);
-
- while (virtual_start < virtual_end) {
- struct page *page;
-
- /*
- * Clear page reserved bit,
- * set count to 1, and free
- * the page.
- */
- page = virt_to_page(virtual_start);
- ClearPageReserved(page);
- init_page_count(page);
- free_page(virtual_start);
-
- virtual_start += PAGE_SIZE;
- mb_freed += PAGE_SIZE / 1024;
- }
-
- printk("acornfb: freed %dK memory\n", mb_freed);
+ free_reserved_area(virtual_start, PAGE_ALIGN(virtual_end),
+ -1, "acornfb");
}
static int acornfb_probe(struct platform_device *dev)
--
1.7.9.5
^ permalink raw reply related
* Re: [PATCH 1/3] backlight: ep93xx_bl: fix section mismatch
From: Ryan Mallon @ 2013-03-16 2:19 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: Linux Kernel, linux-fbdev, rpurdie, FlorianSchandinat
In-Reply-To: <201303151803.08774.hartleys@visionengravers.com>
On 16/03/13 12:03, H Hartley Sweeten wrote:
> Remove the __init tag from ep93xxbl_probe() to fix the section
> mismatch warning.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <rmallon@gmail.com>
> Cc: Richard Purdie <rpurdie@rpsys.net>
> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
There is a patch for this already queued in Andrew Morton's tree.
~Ryan
> ---
> drivers/video/backlight/ep93xx_bl.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/backlight/ep93xx_bl.c b/drivers/video/backlight/ep93xx_bl.c
> index ef3e21e..17b8abb 100644
> --- a/drivers/video/backlight/ep93xx_bl.c
> +++ b/drivers/video/backlight/ep93xx_bl.c
> @@ -60,7 +60,7 @@ static const struct backlight_ops ep93xxbl_ops = {
> .get_brightness = ep93xxbl_get_brightness,
> };
>
> -static int __init ep93xxbl_probe(struct platform_device *dev)
> +static int ep93xxbl_probe(struct platform_device *dev)
> {
> struct ep93xxbl *ep93xxbl;
> struct backlight_device *bl;
> @@ -145,7 +145,6 @@ static struct platform_driver ep93xxbl_driver = {
> .suspend = ep93xxbl_suspend,
> .resume = ep93xxbl_resume,
> };
> -
> module_platform_driver(ep93xxbl_driver);
>
> MODULE_DESCRIPTION("EP93xx Backlight Driver");
^ permalink raw reply
* [PATCH 2/3] video: ep93xx-fb.c: fix section mismatch and use module_platform_driver
From: H Hartley Sweeten @ 2013-03-16 1:05 UTC (permalink / raw)
To: Linux Kernel; +Cc: linux-fbdev, Ryan Mallon, FlorianSchandinat
Remove the __init tags from the ep93xxfb_calc_fbsize() and
ep93xxfb_alloc_videomem() functions to fix the section mismatch
warnings.
Use module_platform_driver() to remove the init/exit boilerplate.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
---
drivers/video/ep93xx-fb.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c
index e06cd5d..ee1ee54 100644
--- a/drivers/video/ep93xx-fb.c
+++ b/drivers/video/ep93xx-fb.c
@@ -419,7 +419,7 @@ static struct fb_ops ep93xxfb_ops = {
.fb_mmap = ep93xxfb_mmap,
};
-static int __init ep93xxfb_calc_fbsize(struct ep93xxfb_mach_info *mach_info)
+static int ep93xxfb_calc_fbsize(struct ep93xxfb_mach_info *mach_info)
{
int i, fb_size = 0;
@@ -441,7 +441,7 @@ static int __init ep93xxfb_calc_fbsize(struct ep93xxfb_mach_info *mach_info)
return fb_size;
}
-static int __init ep93xxfb_alloc_videomem(struct fb_info *info)
+static int ep93xxfb_alloc_videomem(struct fb_info *info)
{
struct ep93xx_fbi *fbi = info->par;
char __iomem *virt_addr;
@@ -627,19 +627,7 @@ static struct platform_driver ep93xxfb_driver = {
.owner = THIS_MODULE,
},
};
-
-static int ep93xxfb_init(void)
-{
- return platform_driver_register(&ep93xxfb_driver);
-}
-
-static void __exit ep93xxfb_exit(void)
-{
- platform_driver_unregister(&ep93xxfb_driver);
-}
-
-module_init(ep93xxfb_init);
-module_exit(ep93xxfb_exit);
+module_platform_driver(ep93xxfb_driver);
MODULE_DESCRIPTION("EP93XX Framebuffer Driver");
MODULE_ALIAS("platform:ep93xx-fb");
--
1.8.1.4
^ permalink raw reply related
* [PATCH 1/3] backlight: ep93xx_bl: fix section mismatch
From: H Hartley Sweeten @ 2013-03-16 1:03 UTC (permalink / raw)
To: Linux Kernel; +Cc: linux-fbdev, Ryan Mallon, rpurdie, FlorianSchandinat
Remove the __init tag from ep93xxbl_probe() to fix the section
mismatch warning.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
---
drivers/video/backlight/ep93xx_bl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/backlight/ep93xx_bl.c b/drivers/video/backlight/ep93xx_bl.c
index ef3e21e..17b8abb 100644
--- a/drivers/video/backlight/ep93xx_bl.c
+++ b/drivers/video/backlight/ep93xx_bl.c
@@ -60,7 +60,7 @@ static const struct backlight_ops ep93xxbl_ops = {
.get_brightness = ep93xxbl_get_brightness,
};
-static int __init ep93xxbl_probe(struct platform_device *dev)
+static int ep93xxbl_probe(struct platform_device *dev)
{
struct ep93xxbl *ep93xxbl;
struct backlight_device *bl;
@@ -145,7 +145,6 @@ static struct platform_driver ep93xxbl_driver = {
.suspend = ep93xxbl_suspend,
.resume = ep93xxbl_resume,
};
-
module_platform_driver(ep93xxbl_driver);
MODULE_DESCRIPTION("EP93xx Backlight Driver");
--
1.8.1.4
^ permalink raw reply related
* Re: [PATCH] video: ep93xx_fb: include <linux/io.h> for devm_ioremap()
From: Ryan Mallon @ 2013-03-15 22:30 UTC (permalink / raw)
To: H Hartley Sweeten
Cc: linux-kernel, linux-fbdev, stable, FlorianSchandinat,
damien.cassou
In-Reply-To: <201303151520.26873.hartleys@visionengravers.com>
On 16/03/13 09:20, H Hartley Sweeten wrote:
> commit be867814 "drivers/video/ep93xx-fb.c: use devm_ functions"
>
> Introduced a build error:
>
> drivers/video/ep93xx-fb.c: In function 'ep93xxfb_probe':
> drivers/video/ep93xx-fb.c:532: error: implicit declaration of function 'devm_ioremap'
> drivers/video/ep93xx-fb.c:533: warning: assignment makes pointer from integer without a cast
>
> Include <linux/io.h> to pickup the declaration of 'devm_ioremap'.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: <stable@vger.kernel.org>
> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> Cc: Ryan Mallon <rmallon@gmail.com>
> Cc: Damien Cassou <damien.cassou@lifl.fr>
Acked-by: Ryan Mallon <rmallon@gmail.com>
> ---
> drivers/video/ep93xx-fb.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c
> index 3f2519d..e06cd5d 100644
> --- a/drivers/video/ep93xx-fb.c
> +++ b/drivers/video/ep93xx-fb.c
> @@ -23,6 +23,7 @@
> #include <linux/slab.h>
> #include <linux/clk.h>
> #include <linux/fb.h>
> +#include <linux/io.h>
>
> #include <linux/platform_data/video-ep93xx.h>
>
^ permalink raw reply
* [PATCH] video: ep93xx_fb: include <linux/io.h> for devm_ioremap()
From: H Hartley Sweeten @ 2013-03-15 22:20 UTC (permalink / raw)
To: linux-kernel
Cc: linux-fbdev, stable, FlorianSchandinat, rmallon, damien.cassou
commit be867814 "drivers/video/ep93xx-fb.c: use devm_ functions"
Introduced a build error:
drivers/video/ep93xx-fb.c: In function 'ep93xxfb_probe':
drivers/video/ep93xx-fb.c:532: error: implicit declaration of function 'devm_ioremap'
drivers/video/ep93xx-fb.c:533: warning: assignment makes pointer from integer without a cast
Include <linux/io.h> to pickup the declaration of 'devm_ioremap'.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: <stable@vger.kernel.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Damien Cassou <damien.cassou@lifl.fr>
---
drivers/video/ep93xx-fb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c
index 3f2519d..e06cd5d 100644
--- a/drivers/video/ep93xx-fb.c
+++ b/drivers/video/ep93xx-fb.c
@@ -23,6 +23,7 @@
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/fb.h>
+#include <linux/io.h>
#include <linux/platform_data/video-ep93xx.h>
--
1.8.1.4
^ permalink raw reply related
* Re: [GIT PULL] at91: framebuffer enhancements for 3.10
From: Arnd Bergmann @ 2013-03-15 22:13 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <5142F3DE.1060209@atmel.com>
On Friday 15 March 2013, Nicolas Ferre wrote:
> Arnd, Olof,
>
> Following our conversation about these framebuffer patches for
> Atmel LCD driver, here are the remaining three patches that can be
> pushed for 3.10. As suggested by Arnd, I have kept them on top of last
> commit concerning this topic that have already been merged in arm-soc 3.9
> fixes branch.
> Thanks a lot for taking care of these modifications.
I think it's reasonable to take the patches through the arm-soc tree here,
because you did not manage to get any feedback on them from Florian
and he also didn't pull them into his framebuffer tree.
However, if you are bypassing a maintainer, you should not do that silently,
and you should note that I don't have any intention of taking all framebuffer
patches in the future.
I've taken Florian and the linux-fbdev list on Cc. If there are any objections
to me taking these through the arm-soc tree, please let us know and we can
revert them to find a better way.
I have applied them to the next/drivers branch in the arm-soc tree now.
Arnd
> The following changes since commit 67cf9c0a00bd88443adb7d6c3efa8b18d03f97c5:
>
> ARM: at91: fix LCD-wiring mode (2013-03-13 11:05:04 +0100)
>
> are available in the git repository at:
>
> git://github.com/at91linux/linux-at91.git tags/at91-driversLCD
>
> for you to fetch changes up to bbd44f6bd9d1aa735b180b29b5719d63a8e87b55:
>
> ARM: at91/avr32/atmel_lcdfb: add platform device-id table (2013-03-13 11:05:12 +0100)
>
> ----------------------------------------------------------------
> Some Atmel framebuffer driver enhancements with modification
> of configuration data in ARM/AT91 and AVR32/AP7 trees.
> A merge of these modifications seems easier through arm-soc
> git tree nowadays.
>
> ----------------------------------------------------------------
> Johan Hovold (3):
> ARM: at91/avr32/atmel_lcdfb: add bus-clock entry
> atmel_lcdfb: move lcdcon2 register access to compute_hozval
> ARM: at91/avr32/atmel_lcdfb: add platform device-id table
>
> arch/arm/mach-at91/at91sam9261.c | 2 +
> arch/arm/mach-at91/at91sam9261_devices.c | 6 +-
> arch/arm/mach-at91/at91sam9263.c | 1 +
> arch/arm/mach-at91/at91sam9263_devices.c | 2 +-
> arch/arm/mach-at91/at91sam9g45.c | 2 +
> arch/arm/mach-at91/at91sam9g45_devices.c | 6 +-
> arch/arm/mach-at91/at91sam9rl.c | 1 +
> arch/arm/mach-at91/at91sam9rl_devices.c | 2 +-
> arch/avr32/mach-at32ap/at32ap700x.c | 6 +-
> drivers/video/atmel_lcdfb.c | 120 +++++++++++++++++++++++++++--------
> include/video/atmel_lcdc.h | 4 +-
> 11 files changed, 117 insertions(+), 35 deletions(-)
>
^ permalink raw reply
* Re: [PATCH 10/10] drivers: misc: use module_platform_driver_probe()
From: Arnd Bergmann @ 2013-03-15 20:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F0020980106B9E@AUSP01VMBX24.collaborationhost.net>
On Friday 15 March 2013, H Hartley Sweeten wrote:
> Arnd,
>
> Ill look at converting the ep93xx pwm driver to the PWM subsystem. The only issue is
> the current driver exposes a sysfs interface that I think is not available in that subsystem.
You can probably keep providing that interface if you have active users.
> >* Regarding the use of module_platform_driver_probe, I'm a little worried about
> > the interactions with deferred probing. I don't think there are any regressions,
> > but we should probably make people aware that one cannot return -EPROBE_DEFER
> > from a platform_driver_probe function.
>
> The ep93xx pwm driver does not need to use platform_driver_probe(). It can be changed
> to use module_platform_driver() by just moving the .probe to the platform_driver. This
> driver was added before module_platform_driver() was available and I used the
> platform_driver_probe() thinking it would save a couple lines of code.
>
> I'll change this in a bit. Right now I'm trying to work out why kernel 3.8 is not booting
> on the ep93xx. I had 3.6.6 on my development board and 3.7 works fine but 3.8 hangs
> without uncompressing the kernel.
Ok, thanks!
Arnd
^ permalink raw reply
* Re: [PATCH v2 8/8] drivers: misc: use module_platform_driver_probe()
From: Greg Kroah-Hartman @ 2013-03-15 18:13 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1363280978-24051-9-git-send-email-fabio.porcedda@gmail.com>
On Thu, Mar 14, 2013 at 06:09:38PM +0100, Fabio Porcedda wrote:
> This patch converts the drivers to use the
> module_platform_driver_probe() macro which makes the code smaller and
> a bit simpler.
Someone else beat you to this fix for these files, sorry.
greg k-h
^ permalink raw reply
* Re: [PATCH 10/10] drivers: misc: use module_platform_driver_probe()
From: Fabio Porcedda @ 2013-03-15 18:09 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <201303151128.48432.arnd@arndb.de>
On Fri, Mar 15, 2013 at 12:28 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Friday 15 March 2013, Fabio Porcedda wrote:
>> >> * Regarding the use of module_platform_driver_probe, I'm a little worried about
>> >> the interactions with deferred probing. I don't think there are any regressions,
>> >> but we should probably make people aware that one cannot return -EPROBE_DEFER
>> >> from a platform_driver_probe function.
>>
>> The use of module_platform_driver_probe() doesn't change anything about that,
>> it's exactly the same thing as using "return platform_driver_probe()".
>> I'm right or I'm missing something? Maybe are you just speaking about
>> the misuse of "platform_driver_probe"?
>
> Yes, that was what I meant. The point is that if we need to review or remove
> all uses of platform_driver_probe, it would be better not to introduce a
> module_platform_driver_probe() interface to make it easier to use.
Just to let you know, the module_platform_driver_probe() macro is
already in v3.9-rc1 and is already used by some drivers.
In linux-next there are already many patches that use that macro.
Best regards
--
Fabio Porcedda
^ permalink raw reply
* RE: [PATCH 10/10] drivers: misc: use module_platform_driver_probe()
From: H Hartley Sweeten @ 2013-03-15 17:43 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <201303141358.05616.arnd@arndb.de>
On Thursday, March 14, 2013 6:58 AM, Arnd Bergmann wrote:
> On Thursday 14 March 2013, Fabio Porcedda wrote:
>> 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 <fabio.porcedda@gmail.com>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> ---
>> drivers/misc/atmel_pwm.c | 12 +-----------
>> drivers/misc/ep93xx_pwm.c | 13 +------------
>> 2 files changed, 2 insertions(+), 23 deletions(-)
>
> The patch itself seems fine, but there are two issues around it:
>
> * The PWM drivers should really get moved to drivers/pwm and converted to the new
> PWM subsystem. I don't know if Hartley or Hans-Christian have plans to do
> that already.
Arnd,
Ill look at converting the ep93xx pwm driver to the PWM subsystem. The only issue is
the current driver exposes a sysfs interface that I think is not available in that subsystem.
>* Regarding the use of module_platform_driver_probe, I'm a little worried about
> the interactions with deferred probing. I don't think there are any regressions,
> but we should probably make people aware that one cannot return -EPROBE_DEFER
> from a platform_driver_probe function.
The ep93xx pwm driver does not need to use platform_driver_probe(). It can be changed
to use module_platform_driver() by just moving the .probe to the platform_driver. This
driver was added before module_platform_driver() was available and I used the
platform_driver_probe() thinking it would save a couple lines of code.
I'll change this in a bit. Right now I'm trying to work out why kernel 3.8 is not booting
on the ep93xx. I had 3.6.6 on my development board and 3.7 works fine but 3.8 hangs
without uncompressing the kernel.
Regards,
Hartley
^ permalink raw reply
* [PATCH v4] drivers: video: use module_platform_driver_probe()
From: Fabio Porcedda @ 2013-03-15 13:02 UTC (permalink / raw)
To: linux-fbdev, linux-omap
Cc: Florian Tobias Schandinat, Tomi Valkeinen, David Howells,
Geert Uytterhoeven, Kuninori Morimoto
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 <fabio.porcedda@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> # atmel_lcdfb.c
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> # amifb.c
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
Notes:
v4:
- add acked-by Nicolas & Laurent
- fix amifb.c
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..77cb4ff 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);
+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 <nicolas.ferre@atmel.com>");
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 <tomi.valkeinen@ti.com>");
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 <g.liakhovetski@gmx.de>");
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 <g.liakhovetski@gmx.de>");
MODULE_DESCRIPTION("SuperH / ARM-shmobile HDMI driver");
--
1.8.1.5
^ permalink raw reply related
* Re: [PATCH v3] drivers: video: use module_platform_driver_probe()
From: Fabio Porcedda @ 2013-03-15 12:49 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-fbdev, linux-omap, Florian Tobias Schandinat, Nicolas Ferre,
Tomi Valkeinen, David Howells, Geert Uytterhoeven,
Kuninori Morimoto
In-Reply-To: <27269473.thyiPm2NyN@avalon>
On Fri, Mar 15, 2013 at 1:37 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Fabio,
>
> Thank you for the patch.
>
> On Friday 15 March 2013 10:00:19 Fabio Porcedda wrote:
>> 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 <fabio.porcedda@gmail.com>
>> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
>> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
>> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> Cc: David Howells <dhowells@redhat.com>
>> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> ---
>>
>> 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);
>
> I think think you need a "return" here.
>
> After fixing that,
Thanks for reviewing.
I will send shortly the patch v4.
Regards
Fabio Porcedda
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
>> MODULE_LICENSE("GPL");
>> MODULE_ALIAS("platform:amiga-video");
>
> --
> Regards,
>
> Laurent Pinchart
>
^ permalink raw reply
* Re: [PATCH v3] drivers: video: use module_platform_driver_probe()
From: Laurent Pinchart @ 2013-03-15 12:37 UTC (permalink / raw)
To: Fabio Porcedda
Cc: linux-fbdev, linux-omap, Florian Tobias Schandinat, Nicolas Ferre,
Tomi Valkeinen, David Howells, Geert Uytterhoeven,
Kuninori Morimoto
In-Reply-To: <1363338019-13092-1-git-send-email-fabio.porcedda@gmail.com>
Hi Fabio,
Thank you for the patch.
On Friday 15 March 2013 10:00:19 Fabio Porcedda wrote:
> 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 <fabio.porcedda@gmail.com>
> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>
> 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);
I think think you need a "return" here.
After fixing that,
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> MODULE_LICENSE("GPL");
> MODULE_ALIAS("platform:amiga-video");
--
Regards,
Laurent Pinchart
^ permalink raw reply
* Re: [PATCH 10/10] drivers: misc: use module_platform_driver_probe()
From: Arnd Bergmann @ 2013-03-15 11:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAHkwnC9nGsdgOTQZ6VpeDyPWXw7tpP+2oHvnLv6LEr1cNdnrsg@mail.gmail.com>
On Friday 15 March 2013, Fabio Porcedda wrote:
> >> * Regarding the use of module_platform_driver_probe, I'm a little worried about
> >> the interactions with deferred probing. I don't think there are any regressions,
> >> but we should probably make people aware that one cannot return -EPROBE_DEFER
> >> from a platform_driver_probe function.
>
> The use of module_platform_driver_probe() doesn't change anything about that,
> it's exactly the same thing as using "return platform_driver_probe()".
> I'm right or I'm missing something? Maybe are you just speaking about
> the misuse of "platform_driver_probe"?
Yes, that was what I meant. The point is that if we need to review or remove
all uses of platform_driver_probe, it would be better not to introduce a
module_platform_driver_probe() interface to make it easier to use.
Arnd
^ permalink raw reply
* Re: [PATCH 10/10] drivers: misc: use module_platform_driver_probe()
From: Fabio Porcedda @ 2013-03-15 11:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130314140631.GM1906@pengutronix.de>
On Thu, Mar 14, 2013 at 3:06 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Thu, Mar 14, 2013 at 01:58:05PM +0000, Arnd Bergmann wrote:
>> On Thursday 14 March 2013, Fabio Porcedda wrote:
>> > 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 <fabio.porcedda@gmail.com>
>> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> > Cc: Arnd Bergmann <arnd@arndb.de>
>> > ---
>> > drivers/misc/atmel_pwm.c | 12 +-----------
>> > drivers/misc/ep93xx_pwm.c | 13 +------------
>> > 2 files changed, 2 insertions(+), 23 deletions(-)
>>
>> The patch itself seems fine, but there are two issues around it:
>>
>> * The PWM drivers should really get moved to drivers/pwm and converted to the new
>> PWM subsystem. I don't know if Hartley or Hans-Christian have plans to do
>> that already.
>>
>> * Regarding the use of module_platform_driver_probe, I'm a little worried about
>> the interactions with deferred probing. I don't think there are any regressions,
>> but we should probably make people aware that one cannot return -EPROBE_DEFER
>> from a platform_driver_probe function.
The use of module_platform_driver_probe() doesn't change anything about that,
it's exactly the same thing as using "return platform_driver_probe()".
I'm right or I'm missing something? Maybe are you just speaking about
the misuse of "platform_driver_probe"?
Best regards
Fabio Porcedda
>
> I'm worried about this aswell. I think platform_driver_probe shouldn't
> be used anymore. Even if a driver does not explicitly make use of
> -EPROBE_DEFER, it leaks in very quickly if a driver for example uses a
> regulator and just returns the error value from regulator_get.
> Sascha
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* Re: [PATCH 0/5] at91: atmel_lcdfb: regression fixes and cpu_is removal
From: Nicolas Ferre @ 2013-03-15 10:16 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <201303142303.42283.arnd@arndb.de>
On 03/15/2013 12:03 AM, Arnd Bergmann :
> On Wednesday 13 March 2013, Nicolas Ferre wrote:
>> In case we end-up with an agreement on the path those fixes should
>> follow, here is the location of my updated material rebased on top of 3.9-rc2:
>>
>> The following changes since commit f6161aa153581da4a3867a2d1a7caf4be19b6ec9:
>>
>> Linux 3.9-rc2 (2013-03-10 16:54:19 -0700)
>>
>> are available in the git repository at:
>>
>> git://github.com/at91linux/linux-at91.git at91-3.9-fixesLCD
>>
>> for you to fetch changes up to bbd44f6bd9d1aa735b180b29b5719d63a8e87b55:
>>
>> ARM: at91/avr32/atmel_lcdfb: add platform device-id table (2013-03-13 11:05:12 +0100)
>>
>> ----------------------------------------------------------------
>> Johan Hovold (5):
>> atmel_lcdfb: fix 16-bpp modes on older SOCs
>> ARM: at91: fix LCD-wiring mode
>> ARM: at91/avr32/atmel_lcdfb: add bus-clock entry
>> atmel_lcdfb: move lcdcon2 register access to compute_hozval
>> ARM: at91/avr32/atmel_lcdfb: add platform device-id table
>>
>
> I have merged the first two patches into the fixes branch now, from up to commit
> 67cf9c0a. Please resubmit the remaining ones on top of this commit for 3.10, either
> through arm-soc or through the framebuffer tree.
Thanks a lot.
I have just sent the pull-request for remaining material. Tell me if it
is what you've expected.
Best regards,
--
Nicolas Ferre
^ permalink raw reply
* Re: [PATCH v3] drivers: video: use module_platform_driver_probe()
From: Fabio Porcedda @ 2013-03-15 10:11 UTC (permalink / raw)
To: Nicolas Ferre
Cc: linux-fbdev, linux-omap, Florian Tobias Schandinat,
Tomi Valkeinen, David Howells, Geert Uytterhoeven,
Laurent Pinchart, Kuninori Morimoto
In-Reply-To: <5142E9D8.5060801@atmel.com>
On Fri, Mar 15, 2013 at 10:28 AM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> On 03/15/2013 10:00 AM, Fabio Porcedda :
>> 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 <fabio.porcedda@gmail.com>
>> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
>> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
>
> For atmel_lcdfb.c:
>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>
> Thanks Fabio.
>
>> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> Cc: David Howells <dhowells@redhat.com>
>> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> ---
If you prefer a patch for each driver I will split the patch.
Best regards
Fabio Porcedda
>> 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 <nicolas.ferre@atmel.com>");
>> 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 <tomi.valkeinen@ti.com>");
>> 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 <g.liakhovetski@gmx.de>");
>> 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 <g.liakhovetski@gmx.de>");
>> MODULE_DESCRIPTION("SuperH / ARM-shmobile HDMI driver");
>>
>
>
> --
> Nicolas Ferre
--
Fabio Porcedda
^ permalink raw reply
* Re: [PATCH v3] drivers: video: use module_platform_driver_probe()
From: Nicolas Ferre @ 2013-03-15 9:28 UTC (permalink / raw)
To: Fabio Porcedda
Cc: linux-fbdev, linux-omap, Florian Tobias Schandinat,
Tomi Valkeinen, David Howells, Geert Uytterhoeven,
Laurent Pinchart, Kuninori Morimoto
In-Reply-To: <1363338019-13092-1-git-send-email-fabio.porcedda@gmail.com>
On 03/15/2013 10:00 AM, Fabio Porcedda :
> 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 <fabio.porcedda@gmail.com>
> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
For atmel_lcdfb.c:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks Fabio.
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>
> 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 <nicolas.ferre@atmel.com>");
> 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 <tomi.valkeinen@ti.com>");
> 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 <g.liakhovetski@gmx.de>");
> 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 <g.liakhovetski@gmx.de>");
> MODULE_DESCRIPTION("SuperH / ARM-shmobile HDMI driver");
>
--
Nicolas Ferre
^ permalink raw reply
* [PATCH v3] drivers: video: use module_platform_driver_probe()
From: Fabio Porcedda @ 2013-03-15 9:00 UTC (permalink / raw)
To: linux-fbdev, linux-omap
Cc: Florian Tobias Schandinat, Nicolas Ferre, Tomi Valkeinen,
David Howells, Geert Uytterhoeven, Laurent Pinchart,
Kuninori Morimoto
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 <fabio.porcedda@gmail.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
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 <nicolas.ferre@atmel.com>");
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 <tomi.valkeinen@ti.com>");
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 <g.liakhovetski@gmx.de>");
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 <g.liakhovetski@gmx.de>");
MODULE_DESCRIPTION("SuperH / ARM-shmobile HDMI driver");
--
1.8.1.5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox