]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mfd: arizona: Replace arizona_of_get_type() with device_get_match_data()
authorHans de Goede <hdegoede@redhat.com>
Wed, 20 Jan 2021 21:49:54 +0000 (22:49 +0100)
committerLee Jones <lee.jones@linaro.org>
Thu, 4 Feb 2021 13:54:56 +0000 (13:54 +0000)
commit039da225d644e523a3bbec78ee258b25fe0676f9
treeae19020336350a4a25671766a1c92c2082f24c26
parent06e577b45db37e8a96ce04e7daa64480492b4ace
mfd: arizona: Replace arizona_of_get_type() with device_get_match_data()

Replace the custom arizona_of_get_type() function with the generic
device_get_match_data() helper. Besides being a nice cleanup this
also makes it easier to add support for binding to ACPI enumerated
devices.

While at it also fix a possible NULL pointer deref of the id
argument to the probe functions (this could happen on e.g. manual
driver binding through sysfs).

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/arizona-core.c
drivers/mfd/arizona-i2c.c
drivers/mfd/arizona-spi.c
drivers/mfd/arizona.h