mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 17:14:14 +08:00
gpio: mxs: Use of_device_get_match_data()
Use of_device_get_match_data() instead of open-coding it. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
d897738381
commit
1f2d357b9e
@ -290,8 +290,6 @@ MODULE_DEVICE_TABLE(of, mxs_gpio_dt_ids);
|
||||
|
||||
static int mxs_gpio_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct of_device_id *of_id =
|
||||
of_match_device(mxs_gpio_dt_ids, &pdev->dev);
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device_node *parent;
|
||||
static void __iomem *base;
|
||||
@ -306,7 +304,7 @@ static int mxs_gpio_probe(struct platform_device *pdev)
|
||||
port->id = of_alias_get_id(np, "gpio");
|
||||
if (port->id < 0)
|
||||
return port->id;
|
||||
port->devid = (enum mxs_gpio_id) of_id->data;
|
||||
port->devid = (enum mxs_gpio_id)of_device_get_match_data(&pdev->dev);
|
||||
port->dev = &pdev->dev;
|
||||
port->irq = platform_get_irq(pdev, 0);
|
||||
if (port->irq < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user