From patchwork Tue Jun 8 06:25:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 104884 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o586PRri018383 for ; Tue, 8 Jun 2010 06:25:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753034Ab0FHGZ1 (ORCPT ); Tue, 8 Jun 2010 02:25:27 -0400 Received: from mail.renesas.com ([202.234.163.13]:49294 "EHLO mail05.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753170Ab0FHGZ0 (ORCPT ); Tue, 8 Jun 2010 02:25:26 -0400 X-AuditID: ac140388-000000090000020f-e6-4c0de24d16ea Received: from guardian05.idc.renesas.com ([172.20.8.207]) by mail05.idc.renesas.com (sendmail) with ESMTP id o586PHfP008041; Tue, 8 Jun 2010 15:25:17 +0900 (JST) Received: (from root@localhost) by guardian05.idc.renesas.com with id o586PIQP003500; Tue, 8 Jun 2010 15:25:18 +0900 (JST) Received: from mta08.idc.renesas.com (localhost [127.0.0.1]) by mta08.idc.renesas.com with ESMTP id o586PIlp023987; Tue, 8 Jun 2010 15:25:18 +0900 (JST) Received: from PG10870.renesas.com ([172.30.8.159]) by ims05.idc.renesas.com (Sendmail) with ESMTPA id <0L3O00B2RN65ZR@ims05.idc.renesas.com>; Tue, 08 Jun 2010 15:25:17 +0900 (JST) Date: Tue, 08 Jun 2010 15:25:17 +0900 (JST) Date-warning: Date header was inserted by ims05.idc.renesas.com From: Kuninori Morimoto Subject: [PATCH] net/irda/sh_irda: Modify clk_get lookups To: Paul Mundt , "David S. Miller" Cc: Magnus , Linux-SH , Linux-Net Message-id: MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-2022-JP-2?B?U2Fuag==?= =?ISO-2022-JP-2?B?GyQoRCtXGyhC?=) APEL/10.6 Emacs/23.2 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO) X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 08 Jun 2010 06:25:28 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c index 95ccb94..a552590 100644 --- a/arch/arm/mach-shmobile/board-g3evm.c +++ b/arch/arm/mach-shmobile/board-g3evm.c @@ -232,6 +232,7 @@ static struct resource irda_resources[] = { static struct platform_device irda_device = { .name = "sh_irda", + .id = -1, .resource = irda_resources, .num_resources = ARRAY_SIZE(irda_resources), }; diff --git a/drivers/net/irda/sh_irda.c b/drivers/net/irda/sh_irda.c index 9a828b0..9db7084 100644 --- a/drivers/net/irda/sh_irda.c +++ b/drivers/net/irda/sh_irda.c @@ -748,7 +748,6 @@ static int __devinit sh_irda_probe(struct platform_device *pdev) struct net_device *ndev; struct sh_irda_self *self; struct resource *res; - char clk_name[8]; unsigned int irq; int err = -ENOMEM; @@ -775,10 +774,9 @@ static int __devinit sh_irda_probe(struct platform_device *pdev) if (err) goto err_mem_2; - snprintf(clk_name, sizeof(clk_name), "irda%d", pdev->id); - self->clk = clk_get(&pdev->dev, clk_name); + self->clk = clk_get(&pdev->dev, NULL); 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; }