LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, David Thompson <davthompson@nvidia.com>, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <bgolaszewski@baylibre.com>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Asmaa Mnebhi <asmaa@nvidia.com>, Liming Sun <limings@nvidia.com> Subject: [PATCH v1 4/6] gpio: mlxbf2: Use DEFINE_RES_MEM_NAMED() helper macro Date: Mon, 16 Aug 2021 14:59:51 +0300 [thread overview] Message-ID: <20210816115953.72533-5-andriy.shevchenko@linux.intel.com> (raw) In-Reply-To: <20210816115953.72533-1-andriy.shevchenko@linux.intel.com> 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> --- drivers/gpio/gpio-mlxbf2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c index c193d1a9a5dd..3ed95e958c17 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); -- 2.30.2
next prev parent reply other threads:[~2021-08-16 12:01 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-16 11:59 [PATCH v1 0/6] gpio: mlxbf2: Introduce proper interrupt handling Andy Shevchenko 2021-08-16 11:59 ` [PATCH v1 1/6] gpio: mlxbf2: Convert to device PM ops Andy Shevchenko 2021-08-16 13:04 ` Asmaa Mnebhi 2021-08-16 11:59 ` [PATCH v1 2/6] gpio: mlxbf2: Drop wrong use of ACPI_PTR() Andy Shevchenko 2021-08-16 13:05 ` Asmaa Mnebhi 2021-08-16 19:20 ` Bartosz Golaszewski 2021-08-16 19:33 ` Andy Shevchenko 2021-08-16 11:59 ` [PATCH v1 3/6] gpio: mlxbf2: Use devm_platform_ioremap_resource() Andy Shevchenko 2021-08-16 13:05 ` Asmaa Mnebhi 2021-08-16 11:59 ` Andy Shevchenko [this message] 2021-08-16 13:07 ` [PATCH v1 4/6] gpio: mlxbf2: Use DEFINE_RES_MEM_NAMED() helper macro Asmaa Mnebhi 2021-08-16 11:59 ` [PATCH v1 5/6] TODO: gpio: mlxbf2: Introduce IRQ support Andy Shevchenko 2021-08-16 21:34 ` Asmaa Mnebhi 2021-08-18 14:07 ` Andy Shevchenko 2021-08-18 22:40 ` Andrew Lunn 2021-08-19 12:28 ` Asmaa Mnebhi 2021-09-15 19:27 ` Asmaa Mnebhi 2021-09-15 20:19 ` Andrew Lunn 2021-08-16 11:59 ` [PATCH v1 6/6] TODO: net: mellanox: mlxbf_gige: Replace non-standard interrupt handling Andy Shevchenko 2021-08-16 23:06 ` Linus Walleij 2021-08-17 9:05 ` Andy Shevchenko 2021-08-16 12:06 ` [PATCH v1 0/6] gpio: mlxbf2: Introduce proper " Andy Shevchenko 2021-08-16 19:22 ` Bartosz Golaszewski
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210816115953.72533-5-andriy.shevchenko@linux.intel.com \ --to=andriy.shevchenko@linux.intel.com \ --cc=asmaa@nvidia.com \ --cc=bgolaszewski@baylibre.com \ --cc=davem@davemloft.net \ --cc=davthompson@nvidia.com \ --cc=kuba@kernel.org \ --cc=limings@nvidia.com \ --cc=linus.walleij@linaro.org \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=netdev@vger.kernel.org \ --cc=rjw@rjwysocki.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).