On Tue, Nov 05, 2024 at 10:53:59AM +0000, Ricardo Ribalda wrote:
@@ -1329,15 +1329,28 @@ static int uvc_gpio_parse(struct uvc_device *dev) static int uvc_gpio_init_irq(struct uvc_device *dev) { struct uvc_entity *unit = dev->gpio_unit;
- int ret;
if (!unit || unit->gpio.irq < 0) return 0;
- return devm_request_threaded_irq(&dev->udev->dev, unit->gpio.irq, NULL,
uvc_gpio_irq,
IRQF_ONESHOT | IRQF_TRIGGER_FALLING |
IRQF_TRIGGER_RISING,
"uvc_privacy_gpio", dev);
- ret = request_threaded_irq(unit->gpio.irq, NULL, uvc_gpio_irq,
IRQF_ONESHOT | IRQF_TRIGGER_FALLING |
IRQF_TRIGGER_RISING,
"uvc_privacy_gpio", dev);
- if (!ret)
dev->gpio_unit->gpio.inited = true;
I missed:
unit->gpio...;
Or remove unit variable altogether, it's not really needed.