diff options
author | Zhen Lei <thunder.leizhen@huawei.com> | 2021-06-01 10:28:30 +0300 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-06-02 12:51:19 +0300 |
commit | 5ac4b8509fdd8131bd2ee0152c9de8aef30e3863 (patch) | |
tree | b4a79dc24d75d58406091b4f6437bf9af83a07a2 /drivers/mfd/da9055-core.c | |
parent | f928fe143599bb3d28c448398cea1b237c2e7e6e (diff) | |
download | linux-5ac4b8509fdd8131bd2ee0152c9de8aef30e3863.tar.xz |
mfd: da9055: Use DEFINE_RES_IRQ_NAMED() to simplify code
No functional change.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/da9055-core.c')
-rw-r--r-- | drivers/mfd/da9055-core.c | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/drivers/mfd/da9055-core.c b/drivers/mfd/da9055-core.c index d074d213e661..c3bcbd8905c6 100644 --- a/drivers/mfd/da9055-core.c +++ b/drivers/mfd/da9055-core.c @@ -254,41 +254,19 @@ const struct regmap_config da9055_regmap_config = { }; EXPORT_SYMBOL_GPL(da9055_regmap_config); -static const struct resource da9055_onkey_resource = { - .name = "ONKEY", - .start = DA9055_IRQ_NONKEY, - .end = DA9055_IRQ_NONKEY, - .flags = IORESOURCE_IRQ, -}; +static const struct resource da9055_onkey_resource = + DEFINE_RES_IRQ_NAMED(DA9055_IRQ_NONKEY, "ONKEY"); static const struct resource da9055_rtc_resource[] = { - { - .name = "ALM", - .start = DA9055_IRQ_ALARM, - .end = DA9055_IRQ_ALARM, - .flags = IORESOURCE_IRQ, - }, - { - .name = "TICK", - .start = DA9055_IRQ_TICK, - .end = DA9055_IRQ_TICK, - .flags = IORESOURCE_IRQ, - }, + DEFINE_RES_IRQ_NAMED(DA9055_IRQ_ALARM, "ALM"), + DEFINE_RES_IRQ_NAMED(DA9055_IRQ_TICK, "TICK"), }; -static const struct resource da9055_hwmon_resource = { - .name = "HWMON", - .start = DA9055_IRQ_HWMON, - .end = DA9055_IRQ_HWMON, - .flags = IORESOURCE_IRQ, -}; +static const struct resource da9055_hwmon_resource = + DEFINE_RES_IRQ_NAMED(DA9055_IRQ_HWMON, "HWMON"); -static const struct resource da9055_ld05_6_resource = { - .name = "REGULATOR", - .start = DA9055_IRQ_REGULATOR, - .end = DA9055_IRQ_REGULATOR, - .flags = IORESOURCE_IRQ, -}; +static const struct resource da9055_ld05_6_resource = + DEFINE_RES_IRQ_NAMED(DA9055_IRQ_REGULATOR, "REGULATOR"); static const struct mfd_cell da9055_devs[] = { { |