lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DC148C5AA1CEBA4E87973D432B1C2D8825E83DE6@P3PWEX4MB008.ex4.secureserver.net>
Date:	Fri, 30 May 2014 16:49:28 +0000
From:	Hartley Sweeten <HartleyS@...ionengravers.com>
To:	Chase Southwood <chase.southwood@...il.com>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC:	"abbotti@....co.uk" <abbotti@....co.uk>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 4/6] staging: comedi: addi_apci_1564: add a subdevice
 for Change-of-State interrupt support

On Thursday, May 29, 2014 9:43 PM, Chase Southwood wrote:
> This board supports an interrupt that can be generated by an AND/OR
> combination of 16 of the input channels.
>
> Create a separate subdevice to handle this interrupt.
>
> Signed-off-by: Chase Southwood <chase.southwood@...il.com>
> Cc: Ian Abbott <abbotti@....co.uk>
> Cc: H Hartley Sweeten <hsweeten@...ionengravers.com>
> ---
>  drivers/staging/comedi/drivers/addi_apci_1564.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
> index 5901143..183fdc3 100644
> --- a/drivers/staging/comedi/drivers/addi_apci_1564.c
> +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
> @@ -105,7 +105,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
>  			dev->irq = pcidev->irq;
>  	}
>  
> -	ret = comedi_alloc_subdevices(dev, 3);
> +	ret = comedi_alloc_subdevices(dev, 4);
>  	if (ret)
>  		return ret;
>  
> @@ -144,6 +144,20 @@ static int apci1564_auto_attach(struct comedi_device *dev,
>  	s->insn_read = apci1564_timer_read;
>  	s->insn_config = apci1564_timer_config;
>  
> +	/* Change-Of-State (COS) interrupt subdevice */
> +	s = &dev->subdevices[3];
> +	if (dev->irq) {
> +		dev->read_subdev = s;
> +		s->type = COMEDI_SUBD_DI;
> +		s->subdev_flags = SDF_READABLE | SDF_CMD_READ;
> +		s->n_chan = 1;
> +		s->maxdata = 1;
> +		s->range_table = &range_digital;
> +		s->len_chanlist = 1;
> +	} else {
> +		s->type = COMEDI_SUBD_UNUSED;
> +	}
> +
>  	return 0;
>  }

This patch could be merged with patch 5/6 but not a big deal.

Reviewed-by: H Hartley Sweeten <hsweeten@...ionengravers.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ