* [PATCH] HID: cp2112: remove use of gpiochip_remove() retval
@ 2014-09-30 14:24 Pramod Gurav
2014-10-01 7:18 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Pramod Gurav @ 2014-09-30 14:24 UTC (permalink / raw)
To: linux-kernel
Cc: Pramod Gurav, Linus Walleij, Alexandre Courbot, Jiri Kosina,
linux-input, linux-gpio
Get rid of using return value from gpiochip_remove() as it returns
void.
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: linux-input@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
---
drivers/hid/hid-cp2112.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c
index a822db5..3318de6 100644
--- a/drivers/hid/hid-cp2112.c
+++ b/drivers/hid/hid-cp2112.c
@@ -1069,8 +1069,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
return ret;
err_gpiochip_remove:
- if (gpiochip_remove(&dev->gc) < 0)
- hid_err(hdev, "error removing gpio chip\n");
+ gpiochip_remove(&dev->gc);
err_free_i2c:
i2c_del_adapter(&dev->adap);
err_free_dev:
@@ -1089,8 +1088,7 @@ static void cp2112_remove(struct hid_device *hdev)
struct cp2112_device *dev = hid_get_drvdata(hdev);
sysfs_remove_group(&hdev->dev.kobj, &cp2112_attr_group);
- if (gpiochip_remove(&dev->gc))
- hid_err(hdev, "unable to remove gpio chip\n");
+ gpiochip_remove(&dev->gc);
i2c_del_adapter(&dev->adap);
/* i2c_del_adapter has finished removing all i2c devices from our
* adapter. Well behaved devices should no longer call our cp2112_xfer
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: cp2112: remove use of gpiochip_remove() retval
2014-09-30 14:24 [PATCH] HID: cp2112: remove use of gpiochip_remove() retval Pramod Gurav
@ 2014-10-01 7:18 ` Jiri Kosina
2014-10-01 7:26 ` Pramod Gurav
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2014-10-01 7:18 UTC (permalink / raw)
To: Pramod Gurav
Cc: linux-kernel, Linus Walleij, Alexandre Courbot, linux-input,
linux-gpio
On Tue, 30 Sep 2014, Pramod Gurav wrote:
> Get rid of using return value from gpiochip_remove() as it returns
> void.
>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Jiri Kosina <jkosina@suse.cz>
> Cc: linux-input@vger.kernel.org
> Cc: linux-gpio@vger.kernel.org
>
> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
I guess this depends on some other patch that hasn't gone to Linus yet,
right? As Linus' tree currently has this prototype:
int gpiochip_remove(struct gpio_chip *chip)
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: cp2112: remove use of gpiochip_remove() retval
2014-10-01 7:18 ` Jiri Kosina
@ 2014-10-01 7:26 ` Pramod Gurav
2014-10-01 8:01 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Pramod Gurav @ 2014-10-01 7:26 UTC (permalink / raw)
To: Jiri Kosina
Cc: linux-kernel, Linus Walleij, Alexandre Courbot, linux-input,
linux-gpio
On Wednesday 01 October 2014 12:48 PM, Jiri Kosina wrote:
>> > Get rid of using return value from gpiochip_remove() as it returns
>> > void.
>> >
>> > Cc: Linus Walleij <linus.walleij@linaro.org>
>> > Cc: Alexandre Courbot <gnurou@gmail.com>
>> > Cc: Jiri Kosina <jkosina@suse.cz>
>> > Cc: linux-input@vger.kernel.org
>> > Cc: linux-gpio@vger.kernel.org
>> >
>> > Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
> I guess this depends on some other patch that hasn't gone to Linus yet,
> right? As Linus' tree currently has this prototype:
>
> int gpiochip_remove(struct gpio_chip *chip)
Yes. It is yet to make it to linus's tree. But the change is there in
linux-next master branch.
Thanks
Pramod
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: cp2112: remove use of gpiochip_remove() retval
2014-10-01 7:26 ` Pramod Gurav
@ 2014-10-01 8:01 ` Jiri Kosina
2014-10-01 8:19 ` Pramod Gurav
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2014-10-01 8:01 UTC (permalink / raw)
To: Pramod Gurav
Cc: linux-kernel, Linus Walleij, Alexandre Courbot, linux-input,
linux-gpio
On Wed, 1 Oct 2014, Pramod Gurav wrote:
> >> > Cc: Linus Walleij <linus.walleij@linaro.org>
> >> > Cc: Alexandre Courbot <gnurou@gmail.com>
> >> > Cc: Jiri Kosina <jkosina@suse.cz>
> >> > Cc: linux-input@vger.kernel.org
> >> > Cc: linux-gpio@vger.kernel.org
> >> >
> >> > Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
> > I guess this depends on some other patch that hasn't gone to Linus yet,
> > right? As Linus' tree currently has this prototype:
> >
> > int gpiochip_remove(struct gpio_chip *chip)
>
> Yes. It is yet to make it to linus's tree. But the change is there in
> linux-next master branch.
Alright. It probably makes most sense to take this patch together with the
prototype change in one pile (i.e. not through my tree).
For that purpose
Acked-by: Jiri Kosina <jkosina@suse.cz>
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] HID: cp2112: remove use of gpiochip_remove() retval
2014-10-01 8:01 ` Jiri Kosina
@ 2014-10-01 8:19 ` Pramod Gurav
0 siblings, 0 replies; 5+ messages in thread
From: Pramod Gurav @ 2014-10-01 8:19 UTC (permalink / raw)
To: Jiri Kosina
Cc: linux-kernel, Linus Walleij, Alexandre Courbot, linux-input,
linux-gpio
On Wednesday 01 October 2014 01:31 PM, Jiri Kosina wrote:
> On Wed, 1 Oct 2014, Pramod Gurav wrote:
>
>>>>> Cc: Linus Walleij <linus.walleij@linaro.org>
>>>>> Cc: Alexandre Courbot <gnurou@gmail.com>
>>>>> Cc: Jiri Kosina <jkosina@suse.cz>
>>>>> Cc: linux-input@vger.kernel.org
>>>>> Cc: linux-gpio@vger.kernel.org
>>>>>
>>>>> Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com>
>>> I guess this depends on some other patch that hasn't gone to Linus yet,
>>> right? As Linus' tree currently has this prototype:
>>>
>>> int gpiochip_remove(struct gpio_chip *chip)
>>
>> Yes. It is yet to make it to linus's tree. But the change is there in
>> linux-next master branch.
>
> Alright. It probably makes most sense to take this patch together with the
> prototype change in one pile (i.e. not through my tree).
>
> For that purpose
>
> Acked-by: Jiri Kosina <jkosina@suse.cz>
Jiri,
Just realized when Linus told me these changes are already in his tree
as well as in mast of linux-tree. Sorry for spaming and late realizing this.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-01 8:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-30 14:24 [PATCH] HID: cp2112: remove use of gpiochip_remove() retval Pramod Gurav
2014-10-01 7:18 ` Jiri Kosina
2014-10-01 7:26 ` Pramod Gurav
2014-10-01 8:01 ` Jiri Kosina
2014-10-01 8:19 ` Pramod Gurav
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).