diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-08-16 13:59:51 +0200 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2021-08-16 21:21:24 +0200 |
commit | d0ef631d40baa2be1951d122ca59d0cf6e39cf46 (patch) | |
tree | 0a2045d630e49bb2fda405ec1af1ba510ecc58ec /drivers/gpio/gpio-mlxbf2.c | |
parent | gpio: mlxbf2: Use devm_platform_ioremap_resource() (diff) | |
download | linux-d0ef631d40baa2be1951d122ca59d0cf6e39cf46.tar.xz linux-d0ef631d40baa2be1951d122ca59d0cf6e39cf46.zip |
gpio: mlxbf2: Use DEFINE_RES_MEM_NAMED() helper macro
Use DEFINE_RES_MEM_NAMED() to save a couple of lines of code, which makes
the code a bit shorter and easier to read.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Asmaa Mnebhi <asmaa@nvidia.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-mlxbf2.c')
-rw-r--r-- | drivers/gpio/gpio-mlxbf2.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c index 661d5a831ae9..177d03ef4529 100644 --- a/drivers/gpio/gpio-mlxbf2.c +++ b/drivers/gpio/gpio-mlxbf2.c @@ -69,11 +69,8 @@ struct mlxbf2_gpio_param { struct mutex *lock; }; -static struct resource yu_arm_gpio_lock_res = { - .start = YU_ARM_GPIO_LOCK_ADDR, - .end = YU_ARM_GPIO_LOCK_ADDR + YU_ARM_GPIO_LOCK_SIZE - 1, - .name = "YU_ARM_GPIO_LOCK", -}; +static struct resource yu_arm_gpio_lock_res = + DEFINE_RES_MEM_NAMED(YU_ARM_GPIO_LOCK_ADDR, YU_ARM_GPIO_LOCK_SIZE, "YU_ARM_GPIO_LOCK"); static DEFINE_MUTEX(yu_arm_gpio_lock_mutex); |