Re: [PATCH 08/21] header: backport devm_acpi_dev_add_driver_gpios()

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


On Tue, 2017-08-22 at 00:28 +0200, Hauke Mehrtens wrote:
> This is used by some NFC drivers to get information from the ACPI.
> This was added in kernel 4.13, but backporting it to older kernel
> versions than 3.19 is hard because such old kernel versions do not
> even
> have struct acpi_gpio_mapping. This only adds the empty version of
> this
> function as this normally needed some extra support in the generic
> code and I do not care about this functionality.

> +#if LINUX_VERSION_IN_RANGE(3,19,0, 4,13,0)

This I don't understand - you said it's hard to do for <3.19, and then
make a simple no-op for all, but don't do it for <3.19 at all?

Why not just LINUX_VERION_LESS(4,13,0)?

> +#define devm_acpi_dev_add_driver_gpios
> LINUX_BACKPORT(devm_acpi_dev_add_driver_gpios)
> +static inline int devm_acpi_dev_add_driver_gpios(struct device *dev,
> +			      const struct acpi_gpio_mapping *gpios)
> +{
> +	return -ENXIO;
> +}
> +#endif /* LINUX_VERSION_IN_RANGE(4,19,0, 4,13,0) */

Also, typo here.

To unsubscribe from this list: send the line "unsubscribe backports" in

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux