* [PATCH] imxfb: correct location of callbacks in suspend and resume
@ 2010-01-11 16:21
2010-01-11 17:59 ` [PATCH] imxfb: correct location of callbacks in suspend and Sascha Hauer
2010-01-25 15:37 ` [PATCH] imxfb: correct location of callbacks in suspend and resume
0 siblings, 2 replies; 6+ messages in thread
From: @ 2010-01-11 16:21 UTC (permalink / raw)
To: linux-arm-kernel
The probe function passes a pointer to a struct fb_info to
platform_set_drvdata, so don't interpret the return value of
platform_get_drvdata as a pointer to struct imxfb_info.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
---
drivers/video/imxfb.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 66358fa..b4b6dec 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -593,7 +593,8 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
*/
static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
{
- struct imxfb_info *fbi = platform_get_drvdata(dev);
+ struct fb_info *info = platform_get_drvdata(dev);
+ struct imxfb_info *fbi = info->par;
pr_debug("%s\n", __func__);
@@ -603,7 +604,8 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
static int imxfb_resume(struct platform_device *dev)
{
- struct imxfb_info *fbi = platform_get_drvdata(dev);
+ struct fb_info *info = platform_get_drvdata(dev);
+ struct imxfb_info *fbi = info->par;
pr_debug("%s\n", __func__);
--
1.6.5.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] imxfb: correct location of callbacks in suspend and
2010-01-11 16:21 [PATCH] imxfb: correct location of callbacks in suspend and resume
@ 2010-01-11 17:59 ` Sascha Hauer
2010-01-25 15:37 ` [PATCH] imxfb: correct location of callbacks in suspend and resume
1 sibling, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2010-01-11 17:59 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 11, 2010 at 05:21:21PM +0100, Uwe Kleine-König wrote:
> The probe function passes a pointer to a struct fb_info to
> platform_set_drvdata, so don't interpret the return value of
> platform_get_drvdata as a pointer to struct imxfb_info.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: linux-arm-kernel@lists.infradead.org
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/video/imxfb.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
> index 66358fa..b4b6dec 100644
> --- a/drivers/video/imxfb.c
> +++ b/drivers/video/imxfb.c
> @@ -593,7 +593,8 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
> */
> static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
> {
> - struct imxfb_info *fbi = platform_get_drvdata(dev);
> + struct fb_info *info = platform_get_drvdata(dev);
> + struct imxfb_info *fbi = info->par;
>
> pr_debug("%s\n", __func__);
>
> @@ -603,7 +604,8 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
>
> static int imxfb_resume(struct platform_device *dev)
> {
> - struct imxfb_info *fbi = platform_get_drvdata(dev);
> + struct fb_info *info = platform_get_drvdata(dev);
> + struct imxfb_info *fbi = info->par;
>
> pr_debug("%s\n", __func__);
>
> --
> 1.6.5.2
>
>
--
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 [flat|nested] 6+ messages in thread
* [PATCH] imxfb: correct location of callbacks in suspend and resume
2010-01-11 16:21 [PATCH] imxfb: correct location of callbacks in suspend and resume
2010-01-11 17:59 ` [PATCH] imxfb: correct location of callbacks in suspend and Sascha Hauer
@ 2010-01-25 15:37 `
2010-01-27 23:48 ` [PATCH] imxfb: correct location of callbacks in suspend and Andrew Morton
1 sibling, 1 reply; 6+ messages in thread
From: @ 2010-01-25 15:37 UTC (permalink / raw)
To: linux-arm-kernel
The probe function passes a pointer to a struct fb_info to
platform_set_drvdata, so don't interpret the return value of
platform_get_drvdata as a pointer to struct imxfb_info.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sascha Hauer <kernel@pengutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
---
drivers/video/imxfb.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 66358fa..b4b6dec 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -593,7 +593,8 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
*/
static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
{
- struct imxfb_info *fbi = platform_get_drvdata(dev);
+ struct fb_info *info = platform_get_drvdata(dev);
+ struct imxfb_info *fbi = info->par;
pr_debug("%s\n", __func__);
@@ -603,7 +604,8 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
static int imxfb_resume(struct platform_device *dev)
{
- struct imxfb_info *fbi = platform_get_drvdata(dev);
+ struct fb_info *info = platform_get_drvdata(dev);
+ struct imxfb_info *fbi = info->par;
pr_debug("%s\n", __func__);
--
1.6.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] imxfb: correct location of callbacks in suspend and
2010-01-25 15:37 ` [PATCH] imxfb: correct location of callbacks in suspend and resume
@ 2010-01-27 23:48 ` Andrew Morton
2010-01-28 7:41 `
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2010-01-27 23:48 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 25 Jan 2010 16:37:34 +0100
Uwe Kleine-K__nig <u.kleine-koenig@pengutronix.de> wrote:
> The probe function passes a pointer to a struct fb_info to
> platform_set_drvdata, so don't interpret the return value of
> platform_get_drvdata as a pointer to struct imxfb_info.
>
> Signed-off-by: Uwe Kleine-K__nig <u.kleine-koenig@pengutronix.de>
> Acked-by: Sascha Hauer <kernel@pengutronix.de>
> Cc: linux-arm-kernel@lists.infradead.org
> ---
> drivers/video/imxfb.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
> index 66358fa..b4b6dec 100644
> --- a/drivers/video/imxfb.c
> +++ b/drivers/video/imxfb.c
> @@ -593,7 +593,8 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
> */
> static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
> {
> - struct imxfb_info *fbi = platform_get_drvdata(dev);
> + struct fb_info *info = platform_get_drvdata(dev);
> + struct imxfb_info *fbi = info->par;
>
> pr_debug("%s\n", __func__);
>
> @@ -603,7 +604,8 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
>
> static int imxfb_resume(struct platform_device *dev)
> {
> - struct imxfb_info *fbi = platform_get_drvdata(dev);
> + struct fb_info *info = platform_get_drvdata(dev);
> + struct imxfb_info *fbi = info->par;
>
> pr_debug("%s\n", __func__);
>
What were the runtime effects of this bug?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] imxfb: correct location of callbacks in suspend and
2010-01-27 23:48 ` [PATCH] imxfb: correct location of callbacks in suspend and Andrew Morton
@ 2010-01-28 7:41 `
2010-01-28 8:19 ` Andrew Morton
0 siblings, 1 reply; 6+ messages in thread
From: @ 2010-01-28 7:41 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
On Wed, Jan 27, 2010 at 03:48:18PM -0800, Andrew Morton wrote:
> On Mon, 25 Jan 2010 16:37:34 +0100
> Uwe Kleine-K__nig <u.kleine-koenig@pengutronix.de> wrote:
>
> > The probe function passes a pointer to a struct fb_info to
> > platform_set_drvdata, so don't interpret the return value of
> > platform_get_drvdata as a pointer to struct imxfb_info.
> >
> > Signed-off-by: Uwe Kleine-K__nig <u.kleine-koenig@pengutronix.de>
> > Acked-by: Sascha Hauer <kernel@pengutronix.de>
> > Cc: linux-arm-kernel@lists.infradead.org
> > ---
> > drivers/video/imxfb.c | 6 ++++--
> > 1 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
> > index 66358fa..b4b6dec 100644
> > --- a/drivers/video/imxfb.c
> > +++ b/drivers/video/imxfb.c
> > @@ -593,7 +593,8 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
> > */
> > static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
> > {
> > - struct imxfb_info *fbi = platform_get_drvdata(dev);
> > + struct fb_info *info = platform_get_drvdata(dev);
> > + struct imxfb_info *fbi = info->par;
> >
> > pr_debug("%s\n", __func__);
> >
> > @@ -603,7 +604,8 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
> >
> > static int imxfb_resume(struct platform_device *dev)
> > {
> > - struct imxfb_info *fbi = platform_get_drvdata(dev);
> > + struct fb_info *info = platform_get_drvdata(dev);
> > + struct imxfb_info *fbi = info->par;
> >
> > pr_debug("%s\n", __func__);
> >
>
> What were the runtime effects of this bug?
For me it was that in the original imxfb_info *fbi backlight_power was
NULL but in imxfb_suspend it was 4 resulting in an oops as imxfb_suspend
calls imxfb_disable_controller(fbi) which in turn has
if (fbi->backlight_power)
fbi->backlight_power(0);
.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] imxfb: correct location of callbacks in suspend and
2010-01-28 7:41 `
@ 2010-01-28 8:19 ` Andrew Morton
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2010-01-28 8:19 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 28 Jan 2010 08:41:01 +0100 Uwe Kleine-K__nig <u.kleine-koenig@pengutronix.de> wrote:
> > What were the runtime effects of this bug?
> For me it was that in the original imxfb_info *fbi backlight_power was
> NULL but in imxfb_suspend it was 4 resulting in an oops as imxfb_suspend
> calls imxfb_disable_controller(fbi) which in turn has
>
> if (fbi->backlight_power)
> fbi->backlight_power(0);
OK, thanks, that was important info.
I rescheduled the patch for 2.6.33 and marked it for 2.6.32.x backporting.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-28 8:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11 16:21 [PATCH] imxfb: correct location of callbacks in suspend and resume
2010-01-11 17:59 ` [PATCH] imxfb: correct location of callbacks in suspend and Sascha Hauer
2010-01-25 15:37 ` [PATCH] imxfb: correct location of callbacks in suspend and resume
2010-01-27 23:48 ` [PATCH] imxfb: correct location of callbacks in suspend and Andrew Morton
2010-01-28 7:41 `
2010-01-28 8:19 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).