提交 d0ef631d 编写于 作者: A Andy Shevchenko 提交者: Bartosz Golaszewski

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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: NAsmaa Mnebhi <asmaa@nvidia.com>
Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
上级 4e6864f8
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册