Commit 8a2b6bef authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Paul Mundt

net/irda/sh_irda: Modify clk_get lookups

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 6e86ccad
...@@ -232,6 +232,7 @@ static struct resource irda_resources[] = { ...@@ -232,6 +232,7 @@ static struct resource irda_resources[] = {
static struct platform_device irda_device = { static struct platform_device irda_device = {
.name = "sh_irda", .name = "sh_irda",
.id = -1,
.resource = irda_resources, .resource = irda_resources,
.num_resources = ARRAY_SIZE(irda_resources), .num_resources = ARRAY_SIZE(irda_resources),
}; };
......
...@@ -748,7 +748,6 @@ static int __devinit sh_irda_probe(struct platform_device *pdev) ...@@ -748,7 +748,6 @@ static int __devinit sh_irda_probe(struct platform_device *pdev)
struct net_device *ndev; struct net_device *ndev;
struct sh_irda_self *self; struct sh_irda_self *self;
struct resource *res; struct resource *res;
char clk_name[8];
unsigned int irq; unsigned int irq;
int err = -ENOMEM; int err = -ENOMEM;
...@@ -775,10 +774,9 @@ static int __devinit sh_irda_probe(struct platform_device *pdev) ...@@ -775,10 +774,9 @@ static int __devinit sh_irda_probe(struct platform_device *pdev)
if (err) if (err)
goto err_mem_2; goto err_mem_2;
snprintf(clk_name, sizeof(clk_name), "irda%d", pdev->id); self->clk = clk_get(&pdev->dev, NULL);
self->clk = clk_get(&pdev->dev, clk_name);
if (IS_ERR(self->clk)) { if (IS_ERR(self->clk)) {
dev_err(&pdev->dev, "cannot get clock \"%s\"\n", clk_name); dev_err(&pdev->dev, "cannot get irda clock\n");
goto err_mem_3; goto err_mem_3;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment