2011-06-12 08:45:09

by Maarten Lankhorst

[permalink] [raw]
Subject: [PATCH] efifb: Fix call to wrong unregister function

Seems like driver_unregister must be called instead of device_unregister.

Signed-off-by: Maarten Lankhorst <[email protected]>
---
drivers/video/efifb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index 69c49df..d8717a6 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -541,7 +541,7 @@ static int __init efifb_init(void)
*/
ret = platform_driver_probe(&efifb_driver, efifb_probe);
if (ret) {
- platform_device_unregister(&efifb_driver);
+ platform_driver_unregister(&efifb_driver);
return ret;
}

--
1.7.4.1


2011-06-12 10:53:04

by Wanlong Gao

[permalink] [raw]
Subject: re:[PATCH] efifb: Fix call to wrong unregister function

<snip>

Hi Maarten:
It registered efifb_device but try to unregistered efifb_driver,
so I think you should fix it like this?

Signed-off-by: Wanlong Gao <[email protected]>
---
drivers/video/efifb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index 69c49df..784139a 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -541,7 +541,7 @@ static int __init efifb_init(void)
*/
ret = platform_driver_probe(&efifb_driver, efifb_probe);
if (ret) {
- platform_device_unregister(&efifb_driver);
+ platform_device_unregister(&efifb_device);
return ret;
}

--
1.7.4.1

2011-06-12 17:48:13

by Maarten Lankhorst

[permalink] [raw]
Subject: Re: [PATCH] efifb: Fix call to wrong unregister function

Hey,

2011/6/12 wanlong.gao <[email protected]>:
> <snip>
>
> Hi Maarten:
> It registered efifb_device but try to unregistered efifb_driver,
> so I think you should fix it like this?
Ah yes, that seems to be the correct one, platform_driver_register was
removed. Not 100% sure if acked by or signed-off-by is appropriate
here.

Signed-off-by: Maarten Lankhorst <[email protected]>

~Maarten

2011-06-12 23:37:00

by Wanlong Gao

[permalink] [raw]
Subject: Re: [PATCH] efifb: Fix call to wrong unregister function

On 日, 2011-06-12 at 19:48 +0200, Maarten Lankhorst wrote:
> Hey,
>
> 2011/6/12 wanlong.gao <[email protected]>:
> > <snip>
> >
> > Hi Maarten:
> > It registered efifb_device but try to unregistered efifb_driver,
> > so I think you should fix it like this?
> Ah yes, that seems to be the correct one, platform_driver_register was
> removed. Not 100% sure if acked by or signed-off-by is appropriate
> here.
I think signed-off-by is OK.
>
> Signed-off-by: Maarten Lankhorst <[email protected]>
>
> ~Maarten

2011-06-13 02:55:46

by Andrew Lutomirski

[permalink] [raw]
Subject: Re: [PATCH] efifb: Fix call to wrong unregister function

On 06/12/2011 06:52 AM, wanlong.gao wrote:
> <snip>
>
> Hi Maarten:
> It registered efifb_device but try to unregistered efifb_driver,
> so I think you should fix it like this?
>
> Signed-off-by: Wanlong Gao<[email protected]>
> ---
> drivers/video/efifb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
> index 69c49df..784139a 100644
> --- a/drivers/video/efifb.c
> +++ b/drivers/video/efifb.c
> @@ -541,7 +541,7 @@ static int __init efifb_init(void)
> */
> ret = platform_driver_probe(&efifb_driver, efifb_probe);
> if (ret) {
> - platform_device_unregister(&efifb_driver);
> + platform_device_unregister(&efifb_device);
> return ret;
> }
>

Acked-by: Andy Lutomirski <[email protected]>

That's my bug. Sorry. I'm not sure why it compiled, though.

--Andy

2011-06-13 07:51:34

by Maarten Lankhorst

[permalink] [raw]
Subject: Re: [PATCH] efifb: Fix call to wrong unregister function

Hi Andy,

2011/6/13 Andy Lutomirski <[email protected]>:
> On 06/12/2011 06:52 AM, wanlong.gao wrote:
>>
>> <snip>
>>
>> Hi Maarten:
>> It registered efifb_device but try to unregistered efifb_driver,
>> so I think you should fix it like this?
>>
>> Signed-off-by: Wanlong Gao<[email protected]>
>> ---
>>  drivers/video/efifb.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
>> index 69c49df..784139a 100644
>> --- a/drivers/video/efifb.c
>> +++ b/drivers/video/efifb.c
>> @@ -541,7 +541,7 @@ static int __init efifb_init(void)
>>         */
>>        ret = platform_driver_probe(&efifb_driver, efifb_probe);
>>        if (ret) {
>> -               platform_device_unregister(&efifb_driver);
>> +               platform_device_unregister(&efifb_device);
>>                return ret;
>>        }
>>
>
> Acked-by: Andy Lutomirski <[email protected]>
>
> That's my bug.  Sorry.  I'm not sure why it compiled, though.
It compiled, but threw a warning. :)

~Maarten

2011-06-14 07:33:54

by Paul Mundt

[permalink] [raw]
Subject: Re: [PATCH] efifb: Fix call to wrong unregister function

On Sun, Jun 12, 2011 at 10:55:37PM -0400, Andy Lutomirski wrote:
> On 06/12/2011 06:52 AM, wanlong.gao wrote:
> ><snip>
> >
> >Hi Maarten:
> >It registered efifb_device but try to unregistered efifb_driver,
> >so I think you should fix it like this?
> >
> >Signed-off-by: Wanlong Gao<[email protected]>
> >---
> > drivers/video/efifb.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> >diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
> >index 69c49df..784139a 100644
> >--- a/drivers/video/efifb.c
> >+++ b/drivers/video/efifb.c
> >@@ -541,7 +541,7 @@ static int __init efifb_init(void)
> > */
> > ret = platform_driver_probe(&efifb_driver, efifb_probe);
> > if (ret) {
> >- platform_device_unregister(&efifb_driver);
> >+ platform_device_unregister(&efifb_device);
> > return ret;
> > }
> >
>
> Acked-by: Andy Lutomirski <[email protected]>
>
Updated version applied, thanks.