From patchwork Mon Jan 9 17:56:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 9505671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F09D6606E1 for ; Mon, 9 Jan 2017 17:56:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D423284C0 for ; Mon, 9 Jan 2017 17:56:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22491284C9; Mon, 9 Jan 2017 17:56:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE788284C0 for ; Mon, 9 Jan 2017 17:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422798AbdAIR4s (ORCPT ); Mon, 9 Jan 2017 12:56:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41206 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422779AbdAIR4r (ORCPT ); Mon, 9 Jan 2017 12:56:47 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8CD3A81231; Mon, 9 Jan 2017 17:56:48 +0000 (UTC) Received: from shalem.localdomain.com (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v09Hukbu007505; Mon, 9 Jan 2017 12:56:47 -0500 From: Hans de Goede To: Dmitry Torokhov Cc: Hans de Goede , "russianneuromancer @ ya . ru" , Gregor Riepl , linux-input@vger.kernel.org Subject: [PATCH 1/3] Input: axp20x-pek - Use our own device for errors Date: Mon, 9 Jan 2017 18:56:42 +0100 Message-Id: <20170109175644.12767-1-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 09 Jan 2017 17:56:48 +0000 (UTC) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Before this commit axp20x-pek was mixing 2 style error reporting calls: dev_err(&pdev->dev, ...); dev_err(axp20x->dev, ...); But the second is our parent device, not our own device, so switch to using &pdev->dev everywhere. Signed-off-by: Hans de Goede --- drivers/input/misc/axp20x-pek.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c index 1ac898d..a041365 100644 --- a/drivers/input/misc/axp20x-pek.c +++ b/drivers/input/misc/axp20x-pek.c @@ -239,7 +239,7 @@ static int axp20x_pek_probe(struct platform_device *pdev) axp20x_pek_irq, 0, "axp20x-pek-dbr", idev); if (error < 0) { - dev_err(axp20x->dev, "Failed to request dbr IRQ#%d: %d\n", + dev_err(&pdev->dev, "Failed to request dbr IRQ#%d: %d\n", axp20x_pek->irq_dbr, error); return error; } @@ -248,14 +248,14 @@ static int axp20x_pek_probe(struct platform_device *pdev) axp20x_pek_irq, 0, "axp20x-pek-dbf", idev); if (error < 0) { - dev_err(axp20x->dev, "Failed to request dbf IRQ#%d: %d\n", + dev_err(&pdev->dev, "Failed to request dbf IRQ#%d: %d\n", axp20x_pek->irq_dbf, error); return error; } error = sysfs_create_group(&pdev->dev.kobj, &axp20x_attribute_group); if (error) { - dev_err(axp20x->dev, "Failed to create sysfs attributes: %d\n", + dev_err(&pdev->dev, "Failed to create sysfs attributes: %d\n", error); return error; } @@ -271,7 +271,7 @@ static int axp20x_pek_probe(struct platform_device *pdev) error = input_register_device(idev); if (error) { - dev_err(axp20x->dev, "Can't register input device: %d\n", + dev_err(&pdev->dev, "Can't register input device: %d\n", error); return error; }