Re: [PATCH v4 3/4] HID: cp2112: Fix driver not registering GPIO IRQ chip as threaded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 06, 2023 at 07:50:15AM -0600, Danny Kaehn wrote:
> The CP2112 generates interrupts from a polling routine on a thread,
> and can only support threaded interrupts. This patch configures the
> gpiochip irq chip with this flag, disallowing consumers to request
> a hard IRQ from this driver, which resulted in a segfault previously.

This looks like a bugfix not dependent on anything else in the series
and can be applied separately...

> 
> Signed-off-by: Danny Kaehn <kaehndan@xxxxxxxxx>
> ---
>  drivers/hid/hid-cp2112.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c
> index 1e16b0fa310d..27cadadda7c9 100644
> --- a/drivers/hid/hid-cp2112.c
> +++ b/drivers/hid/hid-cp2112.c
> @@ -1354,6 +1354,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)
>  	girq->parents = NULL;
>  	girq->default_type = IRQ_TYPE_NONE;
>  	girq->handler = handle_simple_irq;
> +	girq->threaded = true;
>  
>  	ret = gpiochip_add_data(&dev->gc, dev);
>  	if (ret < 0) {
> -- 
> 2.25.1
> 

-- 
Dmitry



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux