diff mbox

[v3,2/4] rtc: at91sam9: Pass pdev->dev to regmap_init_mmio()

Message ID 20180308102154.25686-3-jeffy.chen@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeffy Chen March 8, 2018, 10:21 a.m. UTC
Otherwise it would use "dummy*" to create regmap debugfs dir.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

Changes in v3: None

 drivers/rtc/rtc-at91sam9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandre Belloni March 8, 2018, 8:49 p.m. UTC | #1
On 08/03/2018 at 18:21:52 +0800, Jeffy Chen wrote:
> Otherwise it would use "dummy*" to create regmap debugfs dir.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> ---
> 
> Changes in v3: None
> 
>  drivers/rtc/rtc-at91sam9.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
> index 7418a763ce52..0d6a17a77841 100644
> --- a/drivers/rtc/rtc-at91sam9.c
> +++ b/drivers/rtc/rtc-at91sam9.c
> @@ -402,7 +402,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
>  		if (IS_ERR(gpbr))
>  			return PTR_ERR(gpbr);
>  
> -		rtc->gpbr = regmap_init_mmio(NULL, gpbr,
> +		rtc->gpbr = regmap_init_mmio(&pdev->dev, gpbr,
>  					     &gpbr_regmap_config);

This would be misleading as the gpbr is not directly related to the rtc.
Jeffy Chen March 9, 2018, 1:51 a.m. UTC | #2
Hi Alexandre,

On 03/09/2018 04:49 AM, Alexandre Belloni wrote:
> On 08/03/2018 at 18:21:52 +0800, Jeffy Chen wrote:
>> Otherwise it would use "dummy*" to create regmap debugfs dir.
>>
>> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>> ---
>>
>> Changes in v3: None
>>
>>   drivers/rtc/rtc-at91sam9.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
>> index 7418a763ce52..0d6a17a77841 100644
>> --- a/drivers/rtc/rtc-at91sam9.c
>> +++ b/drivers/rtc/rtc-at91sam9.c
>> @@ -402,7 +402,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
>>   		if (IS_ERR(gpbr))
>>   			return PTR_ERR(gpbr);
>>
>> -		rtc->gpbr = regmap_init_mmio(NULL, gpbr,
>> +		rtc->gpbr = regmap_init_mmio(&pdev->dev, gpbr,
>>   					     &gpbr_regmap_config);
>
> This would be misleading as the gpbr is not directly related to the rtc.
ok, will fix that, thanks.
>
diff mbox

Patch

diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 7418a763ce52..0d6a17a77841 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -402,7 +402,7 @@  static int at91_rtc_probe(struct platform_device *pdev)
 		if (IS_ERR(gpbr))
 			return PTR_ERR(gpbr);
 
-		rtc->gpbr = regmap_init_mmio(NULL, gpbr,
+		rtc->gpbr = regmap_init_mmio(&pdev->dev, gpbr,
 					     &gpbr_regmap_config);
 	} else {
 		struct of_phandle_args args;