summaryrefslogtreecommitdiff
path: root/drivers/mfd/arizona.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-01-20 22:49:54 +0100
committerLee Jones <lee.jones@linaro.org>2021-02-04 13:54:56 +0000
commit039da225d644e523a3bbec78ee258b25fe0676f9 (patch)
treeae19020336350a4a25671766a1c92c2082f24c26 /drivers/mfd/arizona.h
parent06e577b45db37e8a96ce04e7daa64480492b4ace (diff)
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>
Diffstat (limited to 'drivers/mfd/arizona.h')
-rw-r--r--drivers/mfd/arizona.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/mfd/arizona.h b/drivers/mfd/arizona.h
index 995efc6d7f32..801cbbcd71cb 100644
--- a/drivers/mfd/arizona.h
+++ b/drivers/mfd/arizona.h
@@ -50,13 +50,4 @@ int arizona_dev_exit(struct arizona *arizona);
int arizona_irq_init(struct arizona *arizona);
int arizona_irq_exit(struct arizona *arizona);
-#ifdef CONFIG_OF
-unsigned long arizona_of_get_type(struct device *dev);
-#else
-static inline unsigned long arizona_of_get_type(struct device *dev)
-{
- return 0;
-}
-#endif
-
#endif