diff options
Diffstat (limited to 'drivers/rtc/rtc-88pm860x.c')
| -rw-r--r-- | drivers/rtc/rtc-88pm860x.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c index 4e30c85728e..0c6add1a38d 100644 --- a/drivers/rtc/rtc-88pm860x.c +++ b/drivers/rtc/rtc-88pm860x.c @@ -293,7 +293,7 @@ static int pm860x_rtc_dt_init(struct platform_device *pdev,  	int ret;  	if (!np)  		return -ENODEV; -	np = of_find_node_by_name(np, "rtc"); +	np = of_get_child_by_name(np, "rtc");  	if (!np) {  		dev_err(&pdev->dev, "failed to find rtc node\n");  		return -ENODEV; @@ -301,6 +301,7 @@ static int pm860x_rtc_dt_init(struct platform_device *pdev,  	ret = of_property_read_u32(np, "marvell,88pm860x-vrtc", &info->vrtc);  	if (ret)  		info->vrtc = 0; +	of_node_put(np);  	return 0;  }  #else @@ -316,7 +317,7 @@ static int pm860x_rtc_probe(struct platform_device *pdev)  	unsigned long ticks = 0;  	int ret; -	pdata = pdev->dev.platform_data; +	pdata = dev_get_platdata(&pdev->dev);  	info = devm_kzalloc(&pdev->dev, sizeof(struct pm860x_rtc_info),  			    GFP_KERNEL);  | 
