media: cros-ec-cec: do not bail on device_init_wakeup failure
Subsystems (3)
PATCH RESEND 1/1 media: cros-ec-cec: do not bail on device_init_wakeup failure
Do not fail probing when device_init_wakeup fails.
device_init_wakeup fails when the device is already enabled as wakeup device. Hence, the driver fails to probe the device if:
- The device has already been enabled for wakeup (via e.g. sysfs)
- The driver has been unloaded and is being loaded again.
This goal of the patch is to fix the above cases.
Overwhelming majority of the drivers do not check device_init_wakeup return value.
--- drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/media/cec/platform/cros-ec/cros-ec-cec.c +1 -5
@@ -277,11 +277,7 @@ static int cros_ec_cec_probe(struct platform_device *pdev)platform_set_drvdata (pdev, cros_ec_cec); cros_ec_cec->cros_ec = cros_ec; - ret =device_init_wakeup (&pdev->dev,1 ); -if (ret) { -dev_err (&pdev->dev,"failed to initialize wakeup\n" ); -return ret; - } +device_init_wakeup (&pdev->dev,1 ); cros_ec_cec->adap = cec_allocate_adapter(&cros_ec_cec_ops, cros_ec_cec, DRV_NAME,
Signature · 1 line
2.27.0.290.gba653c62da-goog
Quoted 7 lines · Dariusz Marcinkiewicz
Do not fail probing when
device_init_wakeupfails.
device_init_wakeupfails when the device is already enabled as wakeup device. Hence, the driver fails to probe the device if:
- The device has already been enabled for wakeup (via e.g. sysfs)
- The driver has been unloaded and is being loaded again.
Quoted 6 lines
This goal of the patch is to fix the above cases.
Overwhelming majority of the drivers do not check
device_init_wakeupreturn value.Signed-off-by Dariusz Marcinkiewicz <[email protected]>
This can be CCed to stable, I guess?
Can you provide a Fixes: tag as well?
Regards,
Hans
Quoted 22 lines
--- drivers/media/cec/platform/cros-ec/cros-ec-cec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)drivers/media/cec/platform/cros-ec/cros-ec-cec.c +1
-5@@ -277,11 +277,7 @@ static int cros_ec_cec_probe(struct platform_device *pdev)platform_set_drvdata (pdev, cros_ec_cec); cros_ec_cec->cros_ec = cros_ec; - ret =device_init_wakeup (&pdev->dev,1 ); -if (ret) { -dev_err (&pdev->dev,"failed to initialize wakeup\n" ); -return ret; - } +device_init_wakeup (&pdev->dev,1 ); cros_ec_cec->adap = cec_allocate_adapter(&cros_ec_cec_ops, cros_ec_cec, DRV_NAME,
Hello.
I realized that I sent the previous answer using HTML, and as a consequence it was blocked from mailing lists. Sending it again (apologies for double posting).
Quoted 9 lines · Hans Verkuil
Quoted 7 lines · Dariusz Marcinkiewicz
Do not fail probing when
device_init_wakeupfails.
device_init_wakeupfails when the device is already enabled as wakeup device. Hence, the driver fails to probe the device if:
- The device has already been enabled for wakeup (via e.g. sysfs)
- The driver has been unloaded and is being loaded again.
Quoted 9 lines
Quoted 6 lines
This goal of the patch is to fix the above cases.
Overwhelming majority of the drivers do not check
device_init_wakeupreturn value.Signed-off-by Dariusz Marcinkiewicz <[email protected]>This can be CCed to stable, I guess?
That issue is not a recent regression but has been in there since the very beginning. So it might be argued that is it not severe enough to warrant cc'ing stable. Happy to do that anyways if you think otherwise.
Quoted 2 lines
Can you provide a Fixes: tag as well?
Done, submitted v2 with that a couple of days ago.
Thank you and best regards.
Quoted 24 lines · Dariusz Marcinkiewicz
Hello.
I realized that I sent the previous answer using HTML, and as a consequence it was blocked from mailing lists. Sending it again (apologies for double posting).
Quoted 16 lines · Hans Verkuil
Quoted 13 lines · Dariusz Marcinkiewicz
Do not fail probing when
device_init_wakeupfails.
device_init_wakeupfails when the device is already enabled as wakeup device. Hence, the driver fails to probe the device if:
- The device has already been enabled for wakeup (via e.g. sysfs)
- The driver has been unloaded and is being loaded again.This goal of the patch is to fix the above cases.
Overwhelming majority of the drivers do not check
device_init_wakeupreturn value.Signed-off-by Dariusz Marcinkiewicz <[email protected]>
Quoted 8 lines
Quoted 2 lines
This can be CCed to stable, I guess?
That issue is not a recent regression but has been in there since the very beginning. So it might be argued that is it not severe enough to warrant cc'ing stable. Happy to do that anyways if you think otherwise.
Confused. Internally you would like to have this patch applied to chromeos-4.4. Here you suggest that it may not be important enough to apply to stable releases. Which one is it ?
Thanks,
Guenter
Quoted 6 lines
Quoted 2 lines
Can you provide a Fixes: tag as well?
Done, submitted v2 with that a couple of days ago.
Thank you and best regards.
Hi.
Quoted 13 lines · Guenter Roeck
Quoted 12 lines · Hans Verkuil
Quoted 5 lines
Quoted 2 lines
Signed-off-by Dariusz Marcinkiewicz <[email protected]>This can be CCed to stable, I guess?
That issue is not a recent regression but has been in there since the very beginning. So it might be argued that is it not severe enough to warrant cc'ing stable. Happy to do that anyways if you think otherwise.
Quoted 4 lines
Confused. Internally you would like to have this patch applied to chromeos-4.4. Here you suggest that it may not be important enough to apply to stable releases. Which one is it ?
It affects us on 4.4, hence the backport to 4.4. I have nothing against this being merged into the mainline stable. I simply wasn't sure if that should be considered severe enough to be backported there. As said before, I am happy to CC this to stable.
Thank you and best regards.
(apologies for double post again)