mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
rtc: rockchip: get match data with device_get_match_data
This patch fixes a compile warning as following:
drivers/rtc/rtc-rockchip.c: In function 'rockchip_rtc_probe':
drivers/rtc/rtc-rockchip.c:669:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
669 | rtc->mode = (unsigned int)of_device_get_match_data(&pdev->dev);
| ^
Fixes: 7344989b7e ("rtc: support rockchip rtc")
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I53128355e34c6560ccd652631e67c8fc267928f5
This commit is contained in:
parent
dd3f143de6
commit
a3c84f2024
|
|
@ -9,7 +9,6 @@
|
|||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/rtc.h>
|
||||
|
||||
|
|
@ -666,7 +665,7 @@ static int rockchip_rtc_probe(struct platform_device *pdev)
|
|||
return dev_err_probe(dev, PTR_ERR(rtc->regmap),
|
||||
"no regmap available\n");
|
||||
|
||||
rtc->mode = (unsigned int)of_device_get_match_data(&pdev->dev);
|
||||
rtc->mode = (uintptr_t)device_get_match_data(dev);
|
||||
rtc->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
|
||||
if (IS_ERR(rtc->grf)) {
|
||||
dev_warn(dev, "Missing rockchip,grf property\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user