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>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
4e6864f856
commit
d0ef631d40
@@ -69,11 +69,8 @@ struct mlxbf2_gpio_param {
|
|||||||
struct mutex *lock;
|
struct mutex *lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct resource yu_arm_gpio_lock_res = {
|
static struct resource yu_arm_gpio_lock_res =
|
||||||
.start = YU_ARM_GPIO_LOCK_ADDR,
|
DEFINE_RES_MEM_NAMED(YU_ARM_GPIO_LOCK_ADDR, YU_ARM_GPIO_LOCK_SIZE, "YU_ARM_GPIO_LOCK");
|
||||||
.end = YU_ARM_GPIO_LOCK_ADDR + YU_ARM_GPIO_LOCK_SIZE - 1,
|
|
||||||
.name = "YU_ARM_GPIO_LOCK",
|
|
||||||
};
|
|
||||||
|
|
||||||
static DEFINE_MUTEX(yu_arm_gpio_lock_mutex);
|
static DEFINE_MUTEX(yu_arm_gpio_lock_mutex);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user