Re: [PATCH net-next 11/12] net: pse-pd: Add support for event reporting using devm_regulator_irq_helper

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

 



> +int devm_pse_irq_helper(struct pse_controller_dev *pcdev, int irq,
> +			int irq_flags, int supported_errs,
> +			const struct pse_irq_desc *d)
> +{
> +	struct regulator_dev **rdevs;
> +	void *irq_helper;
> +	int i;
> +
> +	rdevs = devm_kcalloc(pcdev->dev, pcdev->nr_lines,
> +			     sizeof(struct regulator_dev *), GFP_KERNEL);
> +	if (!rdevs)
> +		return -ENOMEM;
> +
> +	for (i = 0; i < pcdev->nr_lines; i++)
> +		rdevs[i] = pcdev->pi[i].rdev;
> +
> +	/* Register notifiers - can fail if IRQ is not given */
> +	irq_helper = devm_regulator_irq_helper(pcdev->dev, d, irq,
> +					       0, supported_errs, NULL,
> +					       &rdevs[0], pcdev->nr_lines);

Should irq_flags be passed through? I'm guessing one usage of it will
be IRQF_SHARED when there is one interrupt shared by a number of
controllers.

	Andrew




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux