diff mbox series

[2/2] mfd: mt6397: use DEFINE_RES_* helpers to define RTC resources

Message ID 20190618154347.16991-2-fparent@baylibre.com (mailing list archive)
State New, archived
Headers show
Series [1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1 | expand

Commit Message

Fabien Parent June 18, 2019, 3:43 p.m. UTC
Use the DEFINE_RES_{MEM,IRQ} to define the RTC reosurce for the MT6397
PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
---
 drivers/mfd/mt6397-core.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

Comments

Matthias Brugger June 18, 2019, 9:18 p.m. UTC | #1
On 18/06/2019 17:43, Fabien Parent wrote:
> Use the DEFINE_RES_{MEM,IRQ} to define the RTC reosurce for the MT6397
> PMIC.
> 
> Signed-off-by: Fabien Parent <fparent@baylibre.com>

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>

> ---
>  drivers/mfd/mt6397-core.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
> index 190ed86ad93e..1e315712870b 100644
> --- a/drivers/mfd/mt6397-core.c
> +++ b/drivers/mfd/mt6397-core.c
> @@ -23,16 +23,8 @@
>  #define MT6397_CID_CODE		0x97
>  
>  static const struct resource mt6397_rtc_resources[] = {
> -	{
> -		.start = MT6397_RTC_BASE,
> -		.end   = MT6397_RTC_BASE + MT6397_RTC_SIZE,
> -		.flags = IORESOURCE_MEM,
> -	},
> -	{
> -		.start = MT6397_IRQ_RTC,
> -		.end   = MT6397_IRQ_RTC,
> -		.flags = IORESOURCE_IRQ,
> -	},
> +	DEFINE_RES_MEM(MT6397_RTC_BASE, MT6397_RTC_SIZE),
> +	DEFINE_RES_IRQ(MT6397_IRQ_RTC),
>  };
>  
>  static const struct resource mt6323_keys_resources[] = {
>
diff mbox series

Patch

diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 190ed86ad93e..1e315712870b 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -23,16 +23,8 @@ 
 #define MT6397_CID_CODE		0x97
 
 static const struct resource mt6397_rtc_resources[] = {
-	{
-		.start = MT6397_RTC_BASE,
-		.end   = MT6397_RTC_BASE + MT6397_RTC_SIZE,
-		.flags = IORESOURCE_MEM,
-	},
-	{
-		.start = MT6397_IRQ_RTC,
-		.end   = MT6397_IRQ_RTC,
-		.flags = IORESOURCE_IRQ,
-	},
+	DEFINE_RES_MEM(MT6397_RTC_BASE, MT6397_RTC_SIZE),
+	DEFINE_RES_IRQ(MT6397_IRQ_RTC),
 };
 
 static const struct resource mt6323_keys_resources[] = {