mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-22 10:34:55 +08:00
can: flexcan: make use of platform_get_device_id()
This patch replaces an open coded pdev->id_entry by platform_get_device_id(). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
08c6d35154
commit
d0873e6fc0
@ -1132,9 +1132,9 @@ static int flexcan_probe(struct platform_device *pdev)
|
||||
of_id = of_match_device(flexcan_of_match, &pdev->dev);
|
||||
if (of_id) {
|
||||
devtype_data = of_id->data;
|
||||
} else if (pdev->id_entry->driver_data) {
|
||||
} else if (platform_get_device_id(pdev)->driver_data) {
|
||||
devtype_data = (struct flexcan_devtype_data *)
|
||||
pdev->id_entry->driver_data;
|
||||
platform_get_device_id(pdev)->driver_data;
|
||||
} else {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user