From patchwork Mon Apr 14 16:25:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 3984221 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7CED09F2BA for ; Mon, 14 Apr 2014 16:49:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A99AB201DC for ; Mon, 14 Apr 2014 16:49:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA5E0201DD for ; Mon, 14 Apr 2014 16:49:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755709AbaDNQrq (ORCPT ); Mon, 14 Apr 2014 12:47:46 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:48056 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755479AbaDNQZx (ORCPT ); Mon, 14 Apr 2014 12:25:53 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3EGPSE9023285; Mon, 14 Apr 2014 11:25:28 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3EGPS4u002161; Mon, 14 Apr 2014 11:25:28 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Mon, 14 Apr 2014 11:25:27 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3EGPRYG015473; Mon, 14 Apr 2014 11:25:27 -0500 From: Nishanth Menon To: Tony Lindgren , Santosh Shilimkar , Sricharan R CC: Sekhar Nori , Rajendra Nayak , Nishanth Menon , Peter Ujfalusi , , , , Subject: [PATCH 07/15] bus: omap_l3_noc: populate l3->dev and use it Date: Mon, 14 Apr 2014 11:25:18 -0500 Message-ID: <1397492726-17203-9-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397492726-17203-1-git-send-email-nm@ti.com> References: <1397492726-17203-1-git-send-email-nm@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP l3->dev is not populated, so populate it and use it to print information relevant to the device instead of using a generic pr_*. Signed-off-by: Nishanth Menon --- drivers/bus/omap_l3_noc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c index 0f0417a..da4e27c 100644 --- a/drivers/bus/omap_l3_noc.c +++ b/drivers/bus/omap_l3_noc.c @@ -118,7 +118,8 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3) if (std_err) { WARN(true, - "L3 %s Error: MASTER %s TARGET %s %s\n", + "%s:L3 %s Error: MASTER %s TARGET %s %s\n", + dev_name(l3->dev), err_description, master_name, target_name, err_string); @@ -143,6 +144,7 @@ static int omap4_l3_probe(struct platform_device *pdev) if (!l3) return -ENOMEM; + l3->dev = &pdev->dev; platform_set_drvdata(pdev, l3); /* Get mem resources */ @@ -152,7 +154,7 @@ static int omap4_l3_probe(struct platform_device *pdev) l3->l3_base[i] = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(l3->l3_base[i])) { - dev_err(&pdev->dev, "ioremap %d failed\n", i); + dev_err(l3->dev, "ioremap %d failed\n", i); return PTR_ERR(l3->l3_base[i]); } } @@ -161,19 +163,19 @@ static int omap4_l3_probe(struct platform_device *pdev) * Setup interrupt Handlers */ l3->debug_irq = platform_get_irq(pdev, 0); - ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler, + ret = devm_request_irq(l3->dev, l3->debug_irq, l3_interrupt_handler, IRQF_DISABLED, "l3-dbg-irq", l3); if (ret) { - dev_err(&pdev->dev, "request_irq failed for %d\n", + dev_err(l3->dev, "request_irq failed for %d\n", l3->debug_irq); return ret; } l3->app_irq = platform_get_irq(pdev, 1); - ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler, + ret = devm_request_irq(l3->dev, l3->app_irq, l3_interrupt_handler, IRQF_DISABLED, "l3-app-irq", l3); if (ret) - dev_err(&pdev->dev, "request_irq failed for %d\n", l3->app_irq); + dev_err(l3->dev, "request_irq failed for %d\n", l3->app_irq); return ret; }