In the case of goto destroy_leds, we also need to call hid_hw_stop(hdev) and
remove sysfs attribute files we created for speed and oleds.
Signed-off-by: Axel Lin <redacted>
---
drivers/hid/hid-wacom.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Dnia 17 Września 2012, 3:29 am, Pn, Axel Lin napisał(a):
quoted hunk
In the case of goto destroy_leds, we also need to call hid_hw_stop(hdev)
and
remove sysfs attribute files we created for speed and oleds.
Signed-off-by: Axel Lin <redacted>
---
drivers/hid/hid-wacom.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Hi Alex,
The initial idea was that the OLEDs/LED are not critical for tablet
functioning and that's why there was no call of hid_stop_hw if the
OLED/LED initialisation faild.
What's is the general kernel/HID policy: is it OK to have a device working
with some non-essential features missing?
--
Regards,
Przemo Firszt
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Dnia 17 Września 2012, 3:29 am, Pn, Axel Lin napisał(a):
quoted
In the case of goto destroy_leds, we also need to call hid_hw_stop(hdev)
and
remove sysfs attribute files we created for speed and oleds.
Signed-off-by: Axel Lin <redacted>
---
drivers/hid/hid-wacom.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
The initial idea was that the OLEDs/LED are not critical for tablet
functioning and that's why there was no call of hid_stop_hw if the
OLED/LED initialisation faild.
Since it is not critical, current code ignore checking return value when
device_create_file for speed and oleds.
But current code does goto destroy_leds if wacom_initialize_leds fails.
Which means it returns error code in wacom_probe() and thus it should
clean up all the allocated resources in the error patch.
If you want to ignore wacom_initialize_leds() failure, you should not
call goto destroy_leds.
Comment?
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 2012-09-17 at 16:39 +0800, Axel Lin wrote:
2012/9/17 Przemo Firszt [off-list ref]:
quoted
Dnia 17 Września 2012, 3:29 am, Pn, Axel Lin napisał(a):
quoted
In the case of goto destroy_leds, we also need to call hid_hw_stop(hdev)
and
remove sysfs attribute files we created for speed and oleds.
Signed-off-by: Axel Lin <redacted>
---
drivers/hid/hid-wacom.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
The initial idea was that the OLEDs/LED are not critical for tablet
functioning and that's why there was no call of hid_stop_hw if the
OLED/LED initialisation faild.
Since it is not critical, current code ignore checking return value when
device_create_file for speed and oleds.
But current code does goto destroy_leds if wacom_initialize_leds fails.
Which means it returns error code in wacom_probe() and thus it should
clean up all the allocated resources in the error patch.
If you want to ignore wacom_initialize_leds() failure, you should not
call goto destroy_leds.
Comment?
See my reply to the v2 patch. Thanks for catching that!
--
Kind regards,
Przemo
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html