diff mbox

ARM: amba: Link fb device to its parent

Message ID 1308602657-28783-1-git-send-email-loic.minier@linaro.org
State New
Headers show

Commit Message

Loïc Minier June 20, 2011, 8:44 p.m. UTC
Some pieces of userspace like debian-installer expect to find the fb0
driver name by readlink-ing /sys/class/graphics/fb0/device/driver but
this was broken with amba-clcd as it sets up fb_info manually and missed
the .device parent pointer.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
---
 drivers/video/amba-clcd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Paul Mundt June 24, 2011, 8:07 a.m. UTC | #1
On Mon, Jun 20, 2011 at 10:44:17PM +0200, Lo??c Minier wrote:
> Some pieces of userspace like debian-installer expect to find the fb0
> driver name by readlink-ing /sys/class/graphics/fb0/device/driver but
> this was broken with amba-clcd as it sets up fb_info manually and missed
> the .device parent pointer.
> 
> Signed-off-by: Lo??c Minier <loic.minier@linaro.org>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Paul Mundt <lethal@linux-sh.org>
> ---
>  drivers/video/amba-clcd.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
While this is titled as an ARM patch it's certainly fbdev-specific. I'll
apply it barring any objections from Russell.
Russell King - ARM Linux June 24, 2011, 9:01 a.m. UTC | #2
On Fri, Jun 24, 2011 at 05:07:21PM +0900, Paul Mundt wrote:
> On Mon, Jun 20, 2011 at 10:44:17PM +0200, Lo??c Minier wrote:
> > Some pieces of userspace like debian-installer expect to find the fb0
> > driver name by readlink-ing /sys/class/graphics/fb0/device/driver but
> > this was broken with amba-clcd as it sets up fb_info manually and missed
> > the .device parent pointer.
> > 
> > Signed-off-by: Lo??c Minier <loic.minier@linaro.org>
> > Cc: Russell King <linux@arm.linux.org.uk>
> > Cc: Paul Mundt <lethal@linux-sh.org>
> > ---
> >  drivers/video/amba-clcd.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> While this is titled as an ARM patch it's certainly fbdev-specific. I'll
> apply it barring any objections from Russell.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre June 24, 2011, 1:57 p.m. UTC | #3
On Fri, 24 Jun 2011, Paul Mundt wrote:

> On Mon, Jun 20, 2011 at 10:44:17PM +0200, Lo??c Minier wrote:
> > Some pieces of userspace like debian-installer expect to find the fb0
> > driver name by readlink-ing /sys/class/graphics/fb0/device/driver but
> > this was broken with amba-clcd as it sets up fb_info manually and missed
> > the .device parent pointer.
> > 
> > Signed-off-by: Lo??c Minier <loic.minier@linaro.org>
> > Cc: Russell King <linux@arm.linux.org.uk>
> > Cc: Paul Mundt <lethal@linux-sh.org>
> > ---
> >  drivers/video/amba-clcd.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> While this is titled as an ARM patch it's certainly fbdev-specific. I'll
> apply it barring any objections from Russell.

BTW this should be "Loïc Minier" not "Lo??c Minier" The original email 
was fine with proper UTF-8 in that regard.  Maybe you should have a look 
at your MUA config so the resulting patch log going into git is not 
dammaged.


Nicolas
Paul Mundt June 26, 2011, 4:20 p.m. UTC | #4
On Fri, Jun 24, 2011 at 09:57:06AM -0400, Nicolas Pitre wrote:
> On Fri, 24 Jun 2011, Paul Mundt wrote:
> 
> > On Mon, Jun 20, 2011 at 10:44:17PM +0200, Lo??c Minier wrote:
> > > Some pieces of userspace like debian-installer expect to find the fb0
> > > driver name by readlink-ing /sys/class/graphics/fb0/device/driver but
> > > this was broken with amba-clcd as it sets up fb_info manually and missed
> > > the .device parent pointer.
> > > 
> > > Signed-off-by: Lo??c Minier <loic.minier@linaro.org>
> > > Cc: Russell King <linux@arm.linux.org.uk>
> > > Cc: Paul Mundt <lethal@linux-sh.org>
> > > ---
> > >  drivers/video/amba-clcd.c |    2 ++
> > >  1 files changed, 2 insertions(+), 0 deletions(-)
> > > 
> > While this is titled as an ARM patch it's certainly fbdev-specific. I'll
> > apply it barring any objections from Russell.
> 
> BTW this should be "Lo?c Minier" not "Lo??c Minier" The original email 
> was fine with proper UTF-8 in that regard.  Maybe you should have a look 
> at your MUA config so the resulting patch log going into git is not 
> dammaged.
> 
My MUA ignores UTF-8 intentionally, but this has no bearing on the status
in my git tree.
diff mbox

Patch

diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
index 5fc983c..cf03ad0 100644
--- a/drivers/video/amba-clcd.c
+++ b/drivers/video/amba-clcd.c
@@ -447,6 +447,8 @@  static int clcdfb_register(struct clcd_fb *fb)
 		goto out;
 	}
 
+	fb->fb.device		= &fb->dev->dev;
+
 	fb->fb.fix.mmio_start	= fb->dev->res.start;
 	fb->fb.fix.mmio_len	= resource_size(&fb->dev->res);