Re: Fwd: Re: unbind/bind w1-gpio with device tree produce a crash

2015-03-05 Thread Ingo Flaschberger
Dear Markus, Am 05.03.2015 um 08:35 schrieb Markus Pargmann: Good point. The easy way to solve this may be to check in the remove function if the devicetree node for this device is available. If it is, we know that platform_data was allocated with devm_* and we can set platform_data to NULL. I

Re: Fwd: Re: unbind/bind w1-gpio with device tree produce a crash

2015-03-05 Thread Ingo Flaschberger
Dear Markus, Am 05.03.2015 um 08:35 schrieb Markus Pargmann: Good point. The easy way to solve this may be to check in the remove function if the devicetree node for this device is available. If it is, we know that platform_data was allocated with devm_* and we can set platform_data to NULL. I

Re: Fwd: Re: unbind/bind w1-gpio with device tree produce a crash

2015-03-04 Thread Markus Pargmann
data, this could just be the pointer to the pdata within the device struct. Adding the list as CC again. Best Regards, Markus > > Kind regards, > Ingo Flaschberger > > Weitergeleitete Nachricht ---- > Betreff: Re: unbind/bind w1-gpio with device tree produce a

Re: unbind/bind w1-gpio with device tree produce a crash

2015-03-04 Thread Ingo Flaschberger
is it ok, to create a new global variable that tracks if pdata was alloced via devm_kzalloc and sets pdata to NULL in w1_gpio_remove? Am 04.03.2015 um 04:53 schrieb Ingo Flaschberger: If w1-gpio is probed via device-tree configuration, pdata is allocated via devm_kzalloc. When the device is

Re: unbind/bind w1-gpio with device tree produce a crash

2015-03-04 Thread Ingo Flaschberger
is it ok, to create a new global variable that tracks if pdata was alloced via devm_kzalloc and sets pdata to NULL in w1_gpio_remove? Am 04.03.2015 um 04:53 schrieb Ingo Flaschberger: If w1-gpio is probed via device-tree configuration, pdata is allocated via devm_kzalloc. When the device is

Re: Fwd: Re: unbind/bind w1-gpio with device tree produce a crash

2015-03-04 Thread Markus Pargmann
be the pointer to the pdata within the device struct. Adding the list as CC again. Best Regards, Markus Kind regards, Ingo Flaschberger Weitergeleitete Nachricht Betreff: Re: unbind/bind w1-gpio with device tree produce a crash Datum:Wed, 04 Mar 2015 17:38:48

unbind/bind w1-gpio with device tree produce a crash

2015-03-03 Thread Ingo Flaschberger
If w1-gpio is probed via device-tree configuration, pdata is allocated via devm_kzalloc. When the device is unbind (and bind later) the allocated memory of pdate is freed - but it will not be allocacted again. static int w1_gpio_probe(struct platform_device *pdev) struct w1_bus_master

unbind/bind w1-gpio with device tree produce a crash

2015-03-03 Thread Ingo Flaschberger
If w1-gpio is probed via device-tree configuration, pdata is allocated via devm_kzalloc. When the device is unbind (and bind later) the allocated memory of pdate is freed - but it will not be allocacted again. static int w1_gpio_probe(struct platform_device *pdev) struct w1_bus_master