iio: mxs-lradc: Fix the order of resources removal
Subsystems (4)
Fabio Estevam
reviewerPATCH 1/2 iio: mxs-lradc: Fix the order of resources removal
From: Fabio Estevam <[email protected]>
Fix the order of resources removal in the error path of mxs_lradc_probe() and also in mxs_lradc_remove().
--- drivers/staging/iio/adc/mxs-lradc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/iio/adc/mxs-lradc.c +5 -5
@@ -987,7 +987,7 @@ static int mxs_lradc_probe(struct platform_device *pdev)/* Register the touchscreen input device. */ ret =mxs_lradc_ts_register (lradc);if (ret) - goto err_dev; + goto err_ts_register;/* Register IIO device. */ ret =iio_device_register (iio);
@@ -1000,6 +1000,8 @@ static int mxs_lradc_probe(struct platform_device *pdev) err_ts:mxs_lradc_ts_unregister (lradc); +err_ts_register: +mxs_lradc_hw_stop (lradc); err_dev:mxs_lradc_trigger_remove (iio); err_trig:
@@ -1012,13 +1014,11 @@ static int mxs_lradc_remove(struct platform_device *pdev)struct iio_dev *iio =platform_get_drvdata (pdev);struct mxs_lradc *lradc =iio_priv (iio); +iio_device_unregister (iio);mxs_lradc_ts_unregister (lradc); -mxs_lradc_hw_stop (lradc); - -iio_device_unregister (iio); -iio_triggered_buffer_cleanup (iio);mxs_lradc_trigger_remove (iio); +iio_triggered_buffer_cleanup (iio);return 0 ; }
Signature · 1 line
1.8.1.2
Fabio Estevam
reviewerPATCH 2/2 iio: mxs-lradc: Add MODULE_ALIAS
From: Fabio Estevam <[email protected]>
Add MODULE_ALIAS, so that auto module loading can work.
--- drivers/staging/iio/adc/mxs-lradc.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/iio/adc/mxs-lradc.c +1 -0
@@ -1038,3 +1038,4 @@ module_platform_driver(mxs_lradc_driver);MODULE_AUTHOR ("Marek Vasut <[email protected]>" );MODULE_DESCRIPTION ("Freescale i.MX28 LRADC driver" );MODULE_LICENSE ("GPL v2" ); +MODULE_ALIAS ("platform:" DRIVER_NAME );
Signature · 1 line
1.8.1.2
Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
Dear Fabio Estevam,
Quoted 5 lines
From: Fabio Estevam <[email protected]>
Add
MODULE_ALIAS, so that auto module loading can work.Signed-off-by Fabio Estevam <[email protected]>
Best regards,
Marek Vasut
Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
Quoted 9 lines · Marek Vasut
Dear Fabio Estevam,
Quoted 5 lines
From: Fabio Estevam <[email protected]>
Add
MODULE_ALIAS, so that auto module loading can work.Signed-off-by Fabio Estevam <[email protected]>Acked-by Marek Vasut <[email protected]>
Applied to the togreg branch of iio.git
Anyone fancy getting this driver into a clean form and proposing taking it out of staging?
Fabio Estevam
reviewerRe: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
Hi Jonathan/Marek,
Quoted 7 lines · Jonathan Cameron
Quoted 6 lines · Marek Vasut
Dear Fabio Estevam,
Quoted 4 lines
From: Fabio Estevam <[email protected]>
Add
MODULE_ALIAS, so that auto module loading can work.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Fabio Estevam <[email protected]>Acked-by Marek Vasut <[email protected]>Applied to the togreg branch of iio.git
Anyone fancy getting this driver into a clean form and proposing taking it out of staging?
Does anyone know what still needs to be done in order to take it out of staging?
Regards,
Fabio Estevam
Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
Dear Fabio Estevam,
Quoted 14 lines
Hi Jonathan/Marek,
Quoted 11 lines · Jonathan Cameron
Quoted 9 lines · Marek Vasut
Dear Fabio Estevam,
Quoted 5 lines
From: Fabio Estevam <[email protected]>
Add
MODULE_ALIAS, so that auto module loading can work.Signed-off-by Fabio Estevam <[email protected]>Acked-by Marek Vasut <[email protected]>
Quoted 7 lines
Quoted 4 lines
Applied to the togreg branch of iio.git
Anyone fancy getting this driver into a clean form and proposing taking it out of staging?
Does anyone know what still needs to be done in order to take it out of staging?
I think it should have been taken out of staging for a while now ;-)
Best regards,
Marek Vasut
Jonathan Cameron
maintainerRe: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
Quoted 20 lines · Marek Vasut
Dear Fabio Estevam,
Quoted 3 lines
Hi Jonathan/Marek,
On Sun, Sep 8, 2013 at 11:31 AM, Jonathan Cameron <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines · Marek Vasut
Quoted 6 lines
Dear Fabio Estevam,
Quoted 4 lines
From: Fabio Estevam <[email protected]>
Add
MODULE_ALIAS, so that auto module loading can work.Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Fabio Estevam <[email protected]>Acked-by Marek Vasut <[email protected]>Applied to the togreg branch of iio.git
Anyone fancy getting this driver into a clean form and proposing
Quoted 8 lines
taking
Quoted 3 lines
Quoted 1 line
it out of staging?
Does anyone know what still needs to be done in order to take it out
of
Quoted 1 line
staging?
I think it should have been taken out of staging for a while now ;-)
Post a patch moving it with full code (turn off the move stuff in git format patch) and see what reviews you get.
Obviously best if someone who knows the driver does an initial pass for any cleanups code simplifications and stuff like missing docs.
Quoted 7 lines
Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
Dear Jonathan Cameron,
Quoted 33 lines
Quoted 32 lines · Marek Vasut
Dear Fabio Estevam,
Quoted 3 lines
Hi Jonathan/Marek,
On Sun, Sep 8, 2013 at 11:31 AM, Jonathan Cameron <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines · Marek Vasut
Quoted 6 lines
Dear Fabio Estevam,
Quoted 4 lines
From: Fabio Estevam <[email protected]>
Add
MODULE_ALIAS, so that auto module loading can work.Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Fabio Estevam <[email protected]>Acked-by Marek Vasut <[email protected]>Applied to the togreg branch of iio.git
Anyone fancy getting this driver into a clean form and proposing
taking
Quoted 3 lines
Quoted 1 line
it out of staging?
Does anyone know what still needs to be done in order to take it out
of
Quoted 1 line
staging?
Quoted 7 lines
Quoted 1 line
I think it should have been taken out of staging for a while now ;-)
Post a patch moving it with full code (turn off the move stuff in git format patch) and see what reviews you get.
Obviously best if someone who knows the driver does an initial pass for any cleanups code simplifications and stuff like missing docs.
Will it not be better to get Jurgens' patches in first ?
Best regards,
Marek Vasut
Jonathan Cameron
maintainerRe: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
Quoted 39 lines · Marek Vasut
Dear Jonathan Cameron,
Quoted 6 lines
Quoted 5 lines · Marek Vasut
Dear Fabio Estevam,
Quoted 3 lines
Hi Jonathan/Marek,
On Sun, Sep 8, 2013 at 11:31 AM, Jonathan Cameron
Quoted 15 lines
Quoted 15 lines
Quoted 13 lines · wrote:
Quoted 13 lines · Marek Vasut
Quoted 9 lines
Dear Fabio Estevam,
Quoted 5 lines
From: Fabio Estevam <[email protected]>
Add
MODULE_ALIAS, so that auto module loading can work.Signed-off-by Fabio Estevam <[email protected]>Acked-by Marek Vasut <[email protected]>Applied to the togreg branch of iio.git
Quoted 7 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Anyone fancy getting this driver into a clean form and proposing
taking
Quoted 3 lines
Quoted 1 line
it out of staging?
Does anyone know what still needs to be done in order to take it
out
Quoted 7 lines
Quoted 6 lines
of
Quoted 1 line
staging?
I think it should have been taken out of staging for a while now ;-)
Quoted 8 lines
Quoted 4 lines
Post a patch moving it with full code (turn off the move stuff in git format patch) and see what reviews you get.
Obviously best if someone who knows the driver does an initial pass
for any
Quoted 1 line
cleanups code simplifications and stuff like missing docs.
Will it not be better to get Jurgens' patches in first ?
Indeed. It will.
Quoted 7 lines
Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Fabio Estevam
reviewerRe: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
Quoted 2 lines · Jonathan Cameron
Quoted 1 line
Will it not be better to get Jurgens' patches in first ?
Indeed. It will.
Ok, then I will send a patch moving the mxs-lradc driver into drivers/iio after Juergen's patches get applied.
Dear Fabio Estevam,
Quoted 6 lines
From: Fabio Estevam <[email protected]>
Fix the order of resources removal in the error path of
mxs_lradc_probe()and also inmxs_lradc_remove().Signed-off-by Fabio Estevam <[email protected]>
Best regards,
Marek Vasut
Jonathan Cameron
maintainerQuoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Fix the order of resources removal in the error path of
mxs_lradc_probe()and also inmxs_lradc_remove().Signed-off-by Fabio Estevam <[email protected]>
I 'think' this bug could cause actual trouble but I'll assume it is relatively unlikely and have applied this to the togreg branch of iio.git (won't apply to the current fixes branch).
Anyhow, applied to the togreg branch of iio.git
Quoted 43 lines
--- drivers/staging/iio/adc/mxs-lradc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/staging/iio/adc/mxs-lradc.c +5
-5@@ -987,7 +987,7 @@ static int mxs_lradc_probe(struct platform_device *pdev)/* Register the touchscreen input device. */ ret =mxs_lradc_ts_register (lradc);if (ret) - goto err_dev; + goto err_ts_register;/* Register IIO device. */ ret =iio_device_register (iio);@@ -1000,6 +1000,8 @@ static int mxs_lradc_probe(struct platform_device *pdev) err_ts:mxs_lradc_ts_unregister (lradc); +err_ts_register: +mxs_lradc_hw_stop (lradc); err_dev:mxs_lradc_trigger_remove (iio); err_trig:@@ -1012,13 +1014,11 @@ static int mxs_lradc_remove(struct platform_device *pdev)struct iio_dev *iio =platform_get_drvdata (pdev);struct mxs_lradc *lradc =iio_priv (iio); +iio_device_unregister (iio);mxs_lradc_ts_unregister (lradc); -mxs_lradc_hw_stop (lradc); - -iio_device_unregister (iio); -iio_triggered_buffer_cleanup (iio);mxs_lradc_trigger_remove (iio); +iio_triggered_buffer_cleanup (iio);return 0 ; }