* [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal
@ 2013-09-03 0:48 Fabio Estevam
2013-09-03 0:48 ` [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Fabio Estevam @ 2013-09-03 0:48 UTC (permalink / raw)
To: jic23; +Cc: marex, linux-iio, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
Fix the order of resources removal in the error path of mxs_lradc_probe()
and also in mxs_lradc_remove().
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/staging/iio/adc/mxs-lradc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index a08c173..75f5aac 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -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;
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
2013-09-03 0:48 [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal Fabio Estevam
@ 2013-09-03 0:48 ` Fabio Estevam
2013-09-03 0:59 ` Marek Vasut
2013-09-03 1:00 ` [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal Marek Vasut
2013-09-08 14:29 ` Jonathan Cameron
2 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2013-09-03 0:48 UTC (permalink / raw)
To: jic23; +Cc: marex, linux-iio, Fabio Estevam
From: Fabio Estevam <fabio.estevam@freescale.com>
Add MODULE_ALIAS, so that auto module loading can work.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/staging/iio/adc/mxs-lradc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
index 75f5aac..f36cde5 100644
--- a/drivers/staging/iio/adc/mxs-lradc.c
+++ b/drivers/staging/iio/adc/mxs-lradc.c
@@ -1038,3 +1038,4 @@ module_platform_driver(mxs_lradc_driver);
MODULE_AUTHOR("Marek Vasut <marex@denx.de>");
MODULE_DESCRIPTION("Freescale i.MX28 LRADC driver");
MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" DRIVER_NAME);
--
1.8.1.2
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
2013-09-03 0:48 ` [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS Fabio Estevam
@ 2013-09-03 0:59 ` Marek Vasut
2013-09-08 14:31 ` Jonathan Cameron
0 siblings, 1 reply; 12+ messages in thread
From: Marek Vasut @ 2013-09-03 0:59 UTC (permalink / raw)
To: Fabio Estevam; +Cc: jic23, linux-iio, Fabio Estevam
Dear Fabio Estevam,
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Add MODULE_ALIAS, so that auto module loading can work.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal
2013-09-03 0:48 [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal Fabio Estevam
2013-09-03 0:48 ` [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS Fabio Estevam
@ 2013-09-03 1:00 ` Marek Vasut
2013-09-08 14:29 ` Jonathan Cameron
2 siblings, 0 replies; 12+ messages in thread
From: Marek Vasut @ 2013-09-03 1:00 UTC (permalink / raw)
To: Fabio Estevam; +Cc: jic23, linux-iio, Fabio Estevam
Dear Fabio Estevam,
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Fix the order of resources removal in the error path of mxs_lradc_probe()
> and also in mxs_lradc_remove().
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal
2013-09-03 0:48 [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal Fabio Estevam
2013-09-03 0:48 ` [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS Fabio Estevam
2013-09-03 1:00 ` [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal Marek Vasut
@ 2013-09-08 14:29 ` Jonathan Cameron
2 siblings, 0 replies; 12+ messages in thread
From: Jonathan Cameron @ 2013-09-08 14:29 UTC (permalink / raw)
To: Fabio Estevam; +Cc: jic23, marex, linux-iio, Fabio Estevam
On 09/03/13 01:48, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Fix the order of resources removal in the error path of mxs_lradc_probe()
> and also in mxs_lradc_remove().
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
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
> ---
> drivers/staging/iio/adc/mxs-lradc.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c
> index a08c173..75f5aac 100644
> --- a/drivers/staging/iio/adc/mxs-lradc.c
> +++ b/drivers/staging/iio/adc/mxs-lradc.c
> @@ -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;
> }
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
2013-09-03 0:59 ` Marek Vasut
@ 2013-09-08 14:31 ` Jonathan Cameron
2013-09-08 14:52 ` Fabio Estevam
0 siblings, 1 reply; 12+ messages in thread
From: Jonathan Cameron @ 2013-09-08 14:31 UTC (permalink / raw)
To: Marek Vasut; +Cc: Fabio Estevam, jic23, linux-iio, Fabio Estevam
On 09/03/13 01:59, Marek Vasut wrote:
> Dear Fabio Estevam,
>
>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> Add MODULE_ALIAS, so that auto module loading can work.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>
> Acked-by: Marek Vasut <marex@denx.de>
Applied to the togreg branch of iio.git
Anyone fancy getting this driver into a clean form and proposing taking
it out of staging?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
2013-09-08 14:31 ` Jonathan Cameron
@ 2013-09-08 14:52 ` Fabio Estevam
2013-09-08 15:00 ` Marek Vasut
0 siblings, 1 reply; 12+ messages in thread
From: Fabio Estevam @ 2013-09-08 14:52 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: Marek Vasut, Jonathan Cameron, linux-iio, Fabio Estevam
Hi Jonathan/Marek,
On Sun, Sep 8, 2013 at 11:31 AM, Jonathan Cameron <jic23@kernel.org> wrote:
> On 09/03/13 01:59, Marek Vasut wrote:
>> Dear Fabio Estevam,
>>
>>> From: Fabio Estevam <fabio.estevam@freescale.com>
>>>
>>> Add MODULE_ALIAS, so that auto module loading can work.
>>>
>>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>>
>> Acked-by: Marek Vasut <marex@denx.de>
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
2013-09-08 14:52 ` Fabio Estevam
@ 2013-09-08 15:00 ` Marek Vasut
2013-09-08 15:33 ` Jonathan Cameron
0 siblings, 1 reply; 12+ messages in thread
From: Marek Vasut @ 2013-09-08 15:00 UTC (permalink / raw)
To: Fabio Estevam
Cc: Jonathan Cameron, Jonathan Cameron, linux-iio, Fabio Estevam
Dear Fabio Estevam,
> Hi Jonathan/Marek,
>
> On Sun, Sep 8, 2013 at 11:31 AM, Jonathan Cameron <jic23@kernel.org> wrote:
> > On 09/03/13 01:59, Marek Vasut wrote:
> >> Dear Fabio Estevam,
> >>
> >>> From: Fabio Estevam <fabio.estevam@freescale.com>
> >>>
> >>> Add MODULE_ALIAS, so that auto module loading can work.
> >>>
> >>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> >>
> >> Acked-by: Marek Vasut <marex@denx.de>
> >
> > 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
2013-09-08 15:00 ` Marek Vasut
@ 2013-09-08 15:33 ` Jonathan Cameron
2013-09-08 16:11 ` Marek Vasut
0 siblings, 1 reply; 12+ messages in thread
From: Jonathan Cameron @ 2013-09-08 15:33 UTC (permalink / raw)
To: Marek Vasut, Fabio Estevam; +Cc: Jonathan Cameron, linux-iio, Fabio Estevam
Marek Vasut <marex@denx.de> wrote:
>Dear Fabio Estevam,
>
>> Hi Jonathan/Marek,
>>
>> On Sun, Sep 8, 2013 at 11:31 AM, Jonathan Cameron <jic23@kernel.org>
>wrote:
>> > On 09/03/13 01:59, Marek Vasut wrote:
>> >> Dear Fabio Estevam,
>> >>
>> >>> From: Fabio Estevam <fabio.estevam@freescale.com>
>> >>>
>> >>> Add MODULE_ALIAS, so that auto module loading can work.
>> >>>
>> >>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>> >>
>> >> Acked-by: Marek Vasut <marex@denx.de>
>> >
>> > 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 ;-)
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.
>
>Best regards,
>Marek Vasut
>--
>To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
2013-09-08 15:33 ` Jonathan Cameron
@ 2013-09-08 16:11 ` Marek Vasut
2013-09-08 17:03 ` Jonathan Cameron
0 siblings, 1 reply; 12+ messages in thread
From: Marek Vasut @ 2013-09-08 16:11 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Fabio Estevam, Jonathan Cameron, linux-iio, Fabio Estevam
Dear Jonathan Cameron,
> Marek Vasut <marex@denx.de> wrote:
> >Dear Fabio Estevam,
> >
> >> Hi Jonathan/Marek,
> >>
> >> On Sun, Sep 8, 2013 at 11:31 AM, Jonathan Cameron <jic23@kernel.org>
> >
> >wrote:
> >> > On 09/03/13 01:59, Marek Vasut wrote:
> >> >> Dear Fabio Estevam,
> >> >>
> >> >>> From: Fabio Estevam <fabio.estevam@freescale.com>
> >> >>>
> >> >>> Add MODULE_ALIAS, so that auto module loading can work.
> >> >>>
> >> >>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> >> >>
> >> >> Acked-by: Marek Vasut <marex@denx.de>
> >> >
> >> > 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 ;-)
>
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
2013-09-08 16:11 ` Marek Vasut
@ 2013-09-08 17:03 ` Jonathan Cameron
2013-09-08 18:47 ` Fabio Estevam
0 siblings, 1 reply; 12+ messages in thread
From: Jonathan Cameron @ 2013-09-08 17:03 UTC (permalink / raw)
To: Marek Vasut; +Cc: Fabio Estevam, Jonathan Cameron, linux-iio, Fabio Estevam
Marek Vasut <marex@denx.de> wrote:
>Dear Jonathan Cameron,
>
>> Marek Vasut <marex@denx.de> wrote:
>> >Dear Fabio Estevam,
>> >
>> >> Hi Jonathan/Marek,
>> >>
>> >> On Sun, Sep 8, 2013 at 11:31 AM, Jonathan Cameron
><jic23@kernel.org>
>> >
>> >wrote:
>> >> > On 09/03/13 01:59, Marek Vasut wrote:
>> >> >> Dear Fabio Estevam,
>> >> >>
>> >> >>> From: Fabio Estevam <fabio.estevam@freescale.com>
>> >> >>>
>> >> >>> Add MODULE_ALIAS, so that auto module loading can work.
>> >> >>>
>> >> >>> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
>> >> >>
>> >> >> Acked-by: Marek Vasut <marex@denx.de>
>> >> >
>> >> > 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 ;-)
>>
>> 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 ?
Indeed. It will.
>
>Best regards,
>Marek Vasut
>--
>To unsubscribe from this list: send the line "unsubscribe linux-iio" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS
2013-09-08 17:03 ` Jonathan Cameron
@ 2013-09-08 18:47 ` Fabio Estevam
0 siblings, 0 replies; 12+ messages in thread
From: Fabio Estevam @ 2013-09-08 18:47 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: Marek Vasut, Jonathan Cameron, linux-iio, Fabio Estevam
On Sun, Sep 8, 2013 at 2:03 PM, Jonathan Cameron <jic23@kernel.org> wrote:
>>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.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-09-08 18:47 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 0:48 [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal Fabio Estevam
2013-09-03 0:48 ` [PATCH 2/2] iio: mxs-lradc: Add MODULE_ALIAS Fabio Estevam
2013-09-03 0:59 ` Marek Vasut
2013-09-08 14:31 ` Jonathan Cameron
2013-09-08 14:52 ` Fabio Estevam
2013-09-08 15:00 ` Marek Vasut
2013-09-08 15:33 ` Jonathan Cameron
2013-09-08 16:11 ` Marek Vasut
2013-09-08 17:03 ` Jonathan Cameron
2013-09-08 18:47 ` Fabio Estevam
2013-09-03 1:00 ` [PATCH 1/2] iio: mxs-lradc: Fix the order of resources removal Marek Vasut
2013-09-08 14:29 ` Jonathan Cameron
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).