From: Andy Shevchenko Date: Mon, 16 Aug 2021 11:59:51 +0000 (+0300) Subject: gpio: mlxbf2: Use DEFINE_RES_MEM_NAMED() helper macro X-Git-Tag: accepted/tizen/unified/20230118.172025~6441^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0ef631d40baa2be1951d122ca59d0cf6e39cf46;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Asmaa Mnebhi Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c index 661d5a8..177d03e 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);