i2c-pxa: move i2c_pxa_remove to __devexit instead of just __exit
Subsystems (5)
PATCH 1/6 i2c-pxa: move i2c_pxa_remove to __devexit instead of just __exit
--- drivers/i2c/busses/i2c-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-pxa.c +2 -2
@@ -1115,7 +1115,7 @@ emalloc:return ret; } -static int __exit i2c_pxa_remove(struct platform_device *dev) +static int __devexit i2c_pxa_remove(struct platform_device *dev) {struct pxa_i2c *i2c =platform_get_drvdata (dev);
@@ -1169,7 +1169,7 @@ static const struct dev_pm_ops i2c_pxa_dev_pm_ops = {static struct platform_driver i2c_pxa_driver = { .probe = i2c_pxa_probe, - .remove =__exit_p (i2c_pxa_remove), + .remove =__devexit_p (i2c_pxa_remove), .driver = { .name ="pxa2xx-i2c" , .owner =THIS_MODULE ,
Signature · 1 line
1.7.2.3
PATCH 2/6 mfp-pxa27x: correct naming of GPIO13_KP_DKIN_7
Correct naming of one of pin functions: it's GPIO13_KP_DKIN_7, not GPIO13_KP_KDIN_7.
--- arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-pxa/include/mach/mfp-pxa27x.h +1 -1
@@ -300,7 +300,7 @@#define GPIO97_KP_DKIN_4 MFP_CFG_IN(GPIO97, AF1)#define GPIO98_KP_DKIN_5 MFP_CFG_IN(GPIO98, AF1)#define GPIO99_KP_DKIN_6 MFP_CFG_IN(GPIO99, AF1) -#define GPIO13_KP_KDIN_7 MFP_CFG_IN(GPIO13, AF2) +#define GPIO13_KP_DKIN_7 MFP_CFG_IN(GPIO13, AF2)#define GPIO100_KP_MKIN_0 MFP_CFG_IN(GPIO100, AF1)#define GPIO101_KP_MKIN_1 MFP_CFG_IN(GPIO101, AF1)#define GPIO102_KP_MKIN_2 MFP_CFG_IN(GPIO102, AF1)
Signature · 1 line
1.7.2.3
PATCH 3/6 pxa2xx: update stored gpio settings in pxa2xx_mfp_set_lpm()
In reply to Dmitry Eremin-Solenikovpxa2xx_mfp_set_lpm() reconfigures MFP, but doesn't update gpio_desc cache. Fix that.
--- arch/arm/mach-pxa/mfp-pxa2xx.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/mfp-pxa2xx.c +1 -0
@@ -160,6 +160,7 @@ void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm) c = gpio_desc[gpio].config; c = (c & ~MFP_LPM_STATE_MASK ) | lpm; + gpio_desc[gpio].config = c;__mfp_config_gpio (gpio, c);local_irq_restore (flags);
Signature · 1 line
1.7.2.3
PATCH 4/6 pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform
In reply to Dmitry Eremin-Solenikovpxa2xx_balloon3 tries to register pxa2xx-pcmcia device not checking whether machine is really balloon3, thus messing multi-machine kernels. Fix it up.
--- drivers/pcmcia/pxa2xx_balloon3.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/pcmcia/pxa2xx_balloon3.c +5 -0
@@ -25,6 +25,8 @@#include <mach/balloon3.h> +#include <asm/mach-types.h> +#include "soc_common.h" /*
@@ -128,6 +130,9 @@ static int __init balloon3_pcmcia_init(void) {int ret; +if (!machine_is_balloon3 ()) +return -ENODEV ; + balloon3_pcmcia_device =platform_device_alloc ("pxa2xx-pcmcia" ,-1 );if (!balloon3_pcmcia_device)return -ENOMEM ;
Signature · 1 line
1.7.2.3
PATCH 5/6 pcmcia: limit pxa2xx_trizeps4 subdriver to trizeps4 platform
In reply to Dmitry Eremin-Solenikovpxa2xx_trizeps4 tries to register pxa2xx-pcmcia device not checking whether machine is really trizeps4, thus messing multi-machine kernels. Fix it up.
--- drivers/pcmcia/pxa2xx_trizeps4.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/pcmcia/pxa2xx_trizeps4.c +3 -0
@@ -226,6 +226,9 @@ static int __init trizeps_pcmcia_init(void) {int ret; +if (!machine_is_trizeps4 () && !machine_is_trizeps4wl ()) +return -ENODEV ; + trizeps_pcmcia_device =platform_device_alloc ("pxa2xx-pcmcia" ,-1 );if (!trizeps_pcmcia_device)return -ENOMEM ;
Signature · 1 line
1.7.2.3
PATCH 6/6 Fix eseries compilation if w100fb is not compiled in kernel
In reply to Dmitry Eremin-Solenikove800_tg_change depends on w100fb_gpio_read/write API which is only present if w100fb is compiled in kernel.
--- arch/arm/mach-pxa/eseries.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/eseries.c +2 -0
@@ -829,6 +829,7 @@ static struct w100_mem_info e800_w100_mem_info = {static void e800_tg_change (struct w100fb_par *par) { +#ifdef FB_W100 unsigned long tmp; tmp =w100fb_gpio_read (W100_GPIO_PORT_A );
@@ -837,6 +838,7 @@ static void e800_tg_change(struct w100fb_par *par) else tmp &= ~0x100;w100fb_gpio_write (W100_GPIO_PORT_A , tmp); +#endif }static struct w100_tg_info e800_tg_info = {
Signature · 1 line
1.7.2.3
PATCH 6/6 Fix eseries compilation if w100fb is not compiled in kernel
Hello Dmitry,
Quoted 14 lines · Dmitry Eremin-Solenikov
e800_tg_changedepends on w100fb_gpio_read/write API which is only present if w100fb is compiled in kernel.Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Cc Ian Molton <[email protected]>--- arch/arm/mach-pxa/eseries.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/mach-pxa/eseries.c +0
-0
arch/arm/mach-pxa/eseries.c static struct w100_mem_info e800_w100_mem_info = { · line 832
Quoted 4 lines
arch/arm/mach-pxa/eseries.c +1
-0@@ -829,6 +829,7 @@ static struct w100_mem_info e800_w100_mem_info = {static void e800_tg_change (struct w100fb_par *par) { +#ifdef FB_W100
CONFIG_FB_W100?
arch/arm/mach-pxa/eseries.c static void e800_tg_change(struct w100fb_par *par) · line 841
Quoted 8 lines
arch/arm/mach-pxa/eseries.c +1
-0unsigned long tmp; tmp =w100fb_gpio_read (W100_GPIO_PORT_A );@@ -837,6 +838,7 @@ static void e800_tg_change(struct w100fb_par *par) else tmp &= ~0x100;w100fb_gpio_write (W100_GPIO_PORT_A , tmp); +#endif
What happens if FB_W100=m? The code isn't compiled in, would it still be necessary?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 6/6 Fix eseries compilation if w100fb is not compiled in kernel
Hello again,
Quoted 25 lines · Uwe Kleine-K?nig
Hello Dmitry,
Quoted 14 lines · Dmitry Eremin-Solenikov
e800_tg_changedepends on w100fb_gpio_read/write API which is only present if w100fb is compiled in kernel.Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Cc Ian Molton <[email protected]>--- arch/arm/mach-pxa/eseries.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/mach-pxa/eseries.c +0
-0arch/arm/mach-pxa/eseries.c static struct w100_mem_info e800_w100_mem_info = { · line 832
Quoted 4 lines
arch/arm/mach-pxa/eseries.c +1
-0@@ -829,6 +829,7 @@ static struct w100_mem_info e800_w100_mem_info = {static void e800_tg_change (struct w100fb_par *par) { +#ifdef FB_W100
CONFIG_FB_W100?Quoted 2 lines
arch/arm/mach-pxa/eseries.c +0
-0unsigned long tmp;
Quoted 8 lines
arch/arm/mach-pxa/eseries.c static void e800_tg_change(struct w100fb_par *par) · line 841
Quoted 6 lines
arch/arm/mach-pxa/eseries.c +1
-0tmp =w100fb_gpio_read (W100_GPIO_PORT_A );@@ -837,6 +838,7 @@ static void e800_tg_change(struct w100fb_par *par) else tmp &= ~0x100;w100fb_gpio_write (W100_GPIO_PORT_A , tmp); +#endif What happens if FB_W100=m? The code isn't compiled in, would it still be necessary?
did you see commit a74b74a5555c741ed3df896096e33b853995631e?
http://git.kernel.org/linus/a74b74a5555c741ed3df896096e33b853995631e
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 6/6 Fix eseries compilation if w100fb is not compiled in kernel
2011/1/5 Uwe Kleine-K?nig <[email protected]>:
Quoted 36 lines
Hello again,
Quoted 25 lines · Uwe Kleine-K?nig
Hello Dmitry,
Quoted 14 lines · Dmitry Eremin-Solenikov
e800_tg_changedepends on w100fb_gpio_read/write API which is only present if w100fb is compiled in kernel.Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Cc Ian Molton <[email protected]>---
?arch/arm/mach-pxa/eseries.c | ? ?2 ++
?1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/mach-pxa/eseries.c +0
-0arch/arm/mach-pxa/eseries.c static struct w100_mem_info e800_w100_mem_info = { · line 832
Quoted 4 lines
arch/arm/mach-pxa/eseries.c +1
-0@@ -829,6 +829,7 @@ static struct w100_mem_info e800_w100_mem_info = { ?static void e800_tg_change(struct w100fb_par *par) ?{ +#ifdef FB_W100
CONFIG_FB_W100?Quoted 2 lines
arch/arm/mach-pxa/eseries.c +0
-0? ? unsigned long tmp;Quoted 8 lines
Quoted 6 lines
arch/arm/mach-pxa/eseries.c +0
-0? ? tmp = w100fb_gpio_read(W100_GPIO_PORT_A);@@ -837,6 +838,7 @@ static void e800_tg_change(struct w100fb_par *par)? ? else
? ? ? ? ? ? tmp &= ~0x100;
? ?w100fb_gpio_write(W100_GPIO_PORT_A, tmp);
+#endifWhat happens if FB_W100=m? ?The code isn't compiled in, would it still be necessary?
Quoted 1 line
did you see commit
a74b74a5555c741ed3df896096e33b853995631e?
Missed it. Then this patch can be safely dropped :)
Quoted 10 lines
http://git.kernel.org/linus/a74b74a5555c741ed3df896096e33b853995631e
Best regards
Uwe--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?| Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|
Signature · 2 lines
With best wishes Dmitry
PATCH 1/6 i2c-pxa: move i2c_pxa_remove to __devexit instead of just __exit
In reply to Dmitry Eremin-Solenikova bit of explanation would be nice here. Something like:
Subject: i2c-pxa: make sure the remove callback is called on unbind
When a "pxa2xx-i2c" device was unbound (e.g. via sysfs) the remove callback was not called because it was discarded after boot or module load time. Because of that the resources allocated in probe were not freed and so a rebind was impossible.
Fix that by moving the remove callback to .devexit.text.
This way everyone can understand that a real bug is fixed here.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/6 i2c-pxa: move i2c_pxa_remove to __devexit instead of just __exit
Quoted 4 lines · Uwe Kleine-K?nig
a bit of explanation would be nice here. Something like:
Subject: i2c-pxa: make sure the remove callback is called on unbind
Quoted 8 lines
When a "pxa2xx-i2c" device was unbound (e.g. via sysfs) the remove callback was not called because it was discarded after boot or module load time. Because of that the resources allocated in probe were not freed and so a rebind was impossible.
Fix that by moving the remove callback to .devexit.text.
This way everyone can understand that a real bug is fixed here.
agreed, please re-submit
Signature · 3 lines
Ben Dooks, ben at fluff.org, http://www.fluff.org/ben/ Large Hadron Colada: A large Pina Colada that makes the universe disappear.
PATCH 1/1 i2c-pxa: fix unbidding/rebidding of the device
When a "pxa2xx-i2c" device was unbound (e.g. via sysfs) the remove callback was not called because it was discarded when linking the kernel. Because of that the resources allocated in probe were not freed and so a clean unbind/rebind was impossible.
Fix that by moving the remove callback to .devexit.text.
--- drivers/i2c/busses/i2c-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-pxa.c +2 -2
@@ -1115,7 +1115,7 @@ emalloc:return ret; } -static int __exit i2c_pxa_remove(struct platform_device *dev) +static int __devexit i2c_pxa_remove(struct platform_device *dev) {struct pxa_i2c *i2c =platform_get_drvdata (dev);
@@ -1169,7 +1169,7 @@ static const struct dev_pm_ops i2c_pxa_dev_pm_ops = {static struct platform_driver i2c_pxa_driver = { .probe = i2c_pxa_probe, - .remove =__exit_p (i2c_pxa_remove), + .remove =__devexit_p (i2c_pxa_remove), .driver = { .name ="pxa2xx-i2c" , .owner =THIS_MODULE ,
Signature · 1 line
1.7.2.3
PATCH 1/1 i2c-pxa: fix unbidding/rebidding of the device
Hello
$Subject ~= s/bidd/bind/g
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/1 i2c-pxa: fix unbinding/rebinding of the device
When a "pxa2xx-i2c" device was unbound (e.g. via sysfs) the remove callback was not called because it was discarded when linking the kernel. Because of that the resources allocated in probe were not freed and so a clean unbind/rebind was impossible.
Fix that by moving the remove callback to .devexit.text.
--- drivers/i2c/busses/i2c-pxa.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-pxa.c +2 -2
@@ -1115,7 +1115,7 @@ emalloc:return ret; } -static int __exit i2c_pxa_remove(struct platform_device *dev) +static int __devexit i2c_pxa_remove(struct platform_device *dev) {struct pxa_i2c *i2c =platform_get_drvdata (dev);
@@ -1169,7 +1169,7 @@ static const struct dev_pm_ops i2c_pxa_dev_pm_ops = {static struct platform_driver i2c_pxa_driver = { .probe = i2c_pxa_probe, - .remove =__exit_p (i2c_pxa_remove), + .remove =__devexit_p (i2c_pxa_remove), .driver = { .name ="pxa2xx-i2c" , .owner =THIS_MODULE ,
Signature · 1 line
1.7.2.3
PATCH 1/1 i2c-pxa: fix unbinding/rebinding of the device
Quoted 8 lines · Dmitry Eremin-Solenikov
When a "pxa2xx-i2c" device was unbound (e.g. via sysfs) the remove callback was not called because it was discarded when linking the kernel. Because of that the resources allocated in probe were not freed and so a clean unbind/rebind was impossible.
Fix that by moving the remove callback to .devexit.text.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>
Thanks
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/1 i2c-pxa: fix unbinding/rebinding of the device
Hello, all
2011/1/8 Uwe Kleine-K?nig <[email protected]>:
Quoted 10 lines · Dmitry Eremin-Solenikov
Quoted 8 lines
When a "pxa2xx-i2c" device was unbound (e.g. via sysfs) the remove callback was not called because it was discarded when linking the kernel. ?Because of that the resources allocated in probe were not freed and so a clean unbind/rebind was impossible.
Fix that by moving the remove callback to .devexit.text.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Acked-by Uwe Kleine-K?nig <[email protected]>
I see this patch is still not pushed to neither linus nor linux-next. Should I put it into rmk's patch system? Or will it find it's way to main kernel via other paths?
Quoted 8 lines
Thanks
Uwe--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | Uwe Kleine-K?nig ? ? ? ? ? ?| Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?|
Signature · 2 lines
With best wishes Dmitry
PATCH 1/1 i2c-pxa: fix unbinding/rebinding of the device
Quoted 9 lines · Dmitry Eremin-Solenikov
Hello, all
2011/1/8 Uwe Kleine-K?nig <[email protected]>:
Quoted 6 lines · Dmitry Eremin-Solenikov
Quoted 5 lines
When a "pxa2xx-i2c" device was unbound (e.g. via sysfs) the remove callback was not called because it was discarded when linking the kernel. ?Because of that the resources allocated in probe were not freed and so a clean unbind/rebind was impossible.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
Fix that by moving the remove callback to .devexit.text.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Acked-by Uwe Kleine-K?nig <[email protected]>I see this patch is still not pushed to neither linus nor linux-next. Should I put it into rmk's patch system? Or will it find it's way to main kernel via other paths?
rmk's patch system isn't the right place. Ben needs to take it. Ben?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/6 i2c-pxa: move i2c_pxa_remove to __devexit instead of just __exit
In reply to Dmitry Eremin-SolenikovQuoted 3 lines · Dmitry Eremin-Solenikov
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Cc linux-i2c at vger.kernel.orgCc Ben Dooks <[email protected]>
Please write a reasonable commit message, a null or almost empty commit message is simply unnaceptable. Please see the Documentation/SubmittingPatches or ask more about how to write good commit messages.
Also, see Uwe's reply for a good example of how to write a commit message.
Quoted 6 lines
drivers/i2c/busses/i2c-pxa.c +1
-1-static int __exit i2c_pxa_remove(struct platform_device *dev) +static int __devexit i2c_pxa_remove(struct platform_device *dev) {struct pxa_i2c *i2c =platform_get_drvdata (dev);
drivers/i2c/busses/i2c-pxa.c static const struct dev_pm_ops i2c_pxa_dev_pm_ops = { · line 1175
Quoted 8 lines
drivers/i2c/busses/i2c-pxa.c +1
-1@@ -1169,7 +1169,7 @@ static const struct dev_pm_ops i2c_pxa_dev_pm_ops = {static struct platform_driver i2c_pxa_driver = { .probe = i2c_pxa_probe, - .remove =__exit_p (i2c_pxa_remove), + .remove =__devexit_p (i2c_pxa_remove), .driver = { .name ="pxa2xx-i2c" , .owner =THIS_MODULE ,
Right, I think this should fix any hotplug problems that you have.
Signature · 3 lines
Ben Dooks, ben at fluff.org, http://www.fluff.org/ben/ Large Hadron Colada: A large Pina Colada that makes the universe disappear.
PATCH 1/6 i2c-pxa: move i2c_pxa_remove to __devexit instead of just __exit
In reply to Dmitry Eremin-SolenikovQuoted 4 lines · Dmitry Eremin-Solenikov
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>Cc linux-i2c at vger.kernel.orgCc Ben Dooks <[email protected]>---
this should be queued, and probably sent to Linus
at the end of the weekend.