Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp10740ima; Thu, 31 Jan 2019 11:31:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN4kUNl2nqfO2Sx3Qr70I2qDivFHWEzJC2vHZljxo3zSjpd/qewiP60plAh9xN9HpwR1hjc3 X-Received: by 2002:a62:53c5:: with SMTP id h188mr35457119pfb.190.1548963102350; Thu, 31 Jan 2019 11:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548963102; cv=none; d=google.com; s=arc-20160816; b=uofywxW+iachUZdGcecjWymJZJbKipY7thG9HXJfe9u4GDjnX7H1kXTRfVtS/wmgWO xXVXwhp6t/Z5cRjf6CUD8gM6xdk5zkeDw1dLZZ97C0U4pQnW/IcGKrjjeAG6bu12zR/P i59dwHQVGndRzAYpJUNwLSqoM2ydLUftAOD0n8eCA2O0cb4B5FtPPwD+ywx+yao7yi1b Qw/EBr4SyF1NMuc1sz6Zz1PpdH+sHMOsWVnWwmZxjYJZgYwIpStUeJ948Kv1w2xjyVc1 ID5EZCOkrnCBfltclEL/S2WbtUN1wb4uG9d4w1Pd/poPmZ+SMERboQJwz26xhJa8B/uU ayTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Ge1hrHkar9sk1UI7FF3x9mKF9IHtV/Tb/hl7NzBj2q0=; b=Ogla0Wvl/MPJ4Fl9Oy4/Amz7T9Qzho01x8Omr1JTBKOfJOnLgqAp2af/N2k/gKDYUV F77p4LyHKTRXIRsF4ODNw030eDEc7k0BBU/FsaGkLPG0uNG07oLX6XZpMBHFwtnmy2FL AyOMytB0RYXbmAKeYALsDD53xG1ab1SIp48BCUIC3LV0gyUrkSEiZnzrinxaMkyw14Jz kA4hLx1OwcMo+Q3EJVXb6nWHy91CUL16cAW4AHkB0urCCeJFkrF7iDGMlF3M3ahu2B1Q B+gSSiR0gyj13wdj06NkB+BqSGtaZ1Lzv0lSzvNwPAo+96FULvokDVR2SZXP8UkeTrna cCOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tGyg2jjK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si3627297pgc.580.2019.01.31.11.31.27; Thu, 31 Jan 2019 11:31:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=tGyg2jjK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728940AbfAaT1P (ORCPT + 99 others); Thu, 31 Jan 2019 14:27:15 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:35450 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728824AbfAaT0v (ORCPT ); Thu, 31 Jan 2019 14:26:51 -0500 Received: by mail-lj1-f196.google.com with SMTP id x85-v6so3714813ljb.2 for ; Thu, 31 Jan 2019 11:26:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ge1hrHkar9sk1UI7FF3x9mKF9IHtV/Tb/hl7NzBj2q0=; b=tGyg2jjK+AGMY5E6r/lhzztIgi4cgheyA8T0woQAgQ7s4xkkuqJxCfacbkXNFiOglw mLsBmHRz3T6UklGUbUfD7eYE9Pt/hN3U5iEB+rMGTZ42ic6dlbi5iAK+1N5HJZVvb1Jv MVkWKqVMzZjMjQop0eRmhOkRNqWTGV8+gCEHwmWeuy5FHatQGPOd84EDPhdf4FNqtXjT hv75gxae3V9i3n/UyX2h30CyF5W+84jZcIoGJH7GEVvUq1ZWTrGx5oI0y2/fxr6IRmiQ zouh7gq/HUbzXDmsywN8oQlDtMdAobcNzP1YhMk532GdFt4hgmAOxrEbVTOzGcK7FYFz 589g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=Ge1hrHkar9sk1UI7FF3x9mKF9IHtV/Tb/hl7NzBj2q0=; b=bLaXdrhrdu8/h0U5I1cT+eg3cO9zb1pQxvhnfFVXtfFIZn25GmDl2FrG/Cb0TUnYeY h6jnVYqj5YQ7TLwCU3moVnauWvunriafCYm/TnuVIfo5jA8RhZXMIQ6XanxTiZSQF+Np JhgvJ6KiO01VcB/npbfrmI4X0E20j6gl6bqxNTNUkfgNHG9toEExqoaOYo4VGQ/p2v4t acJ+LvAHvRMfyh1d0ivnBu/um0eQPYv9/59gcC83YfuPbGeMDOytiWui+Tf1YPwP/caS hABsb5gdHZTMATUf/Npb/GaE61OaRs4yXd3tJRlAB8gEwr3Gw/H63V36vEIK9gJpySzO oPHw== X-Gm-Message-State: AJcUukf/eiAwMU8QnpHvnTg4aYOwUoWQZ5oyvZswGqZW6U6FpXeLj7Kk +ayfd8RfiP6a+Rdu85EaDLk= X-Received: by 2002:a2e:917:: with SMTP id 23-v6mr29045541ljj.1.1548962809311; Thu, 31 Jan 2019 11:26:49 -0800 (PST) Received: from jupiter.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id f1sm987363lfm.22.2019.01.31.11.26.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 11:26:48 -0800 (PST) From: Sam Ravnborg To: Thierry Reding , dri-devel@lists.freedesktop.org Cc: Daniel Vetter , David Airlie , Linus Walleij , Stefan Mavrodiev , linux-kernel@vger.kernel.org, Sam Ravnborg Subject: [PATCH v1 15/19] drm/panel: raspberrypi: use DRM_DEV* Date: Thu, 31 Jan 2019 20:26:15 +0100 Message-Id: <20190131192619.9763-16-sam@ravnborg.org> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190131192619.9763-1-sam@ravnborg.org> References: <20190131192619.9763-1-sam@ravnborg.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce use of DRM_DEV* for logging. This makes logging in the drm subsystem more consistent. Signed-off-by: Sam Ravnborg Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter --- .../gpu/drm/panel/panel-raspberrypi-touchscreen.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 28c0620dfe0f..c9013faff9ed 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -57,6 +57,7 @@ #include #include #include +#include #define RPI_DSI_DRIVER_NAME "rpi-ts-dsi" @@ -232,7 +233,7 @@ static void rpi_touchscreen_i2c_write(struct rpi_touchscreen *ts, ret = i2c_smbus_write_byte_data(ts->i2c, reg, val); if (ret) - dev_err(&ts->dsi->dev, "I2C write failed: %d\n", ret); + DRM_DEV_ERROR(&ts->dsi->dev, "I2C write failed: %d\n", ret); } static int rpi_touchscreen_write(struct rpi_touchscreen *ts, u16 reg, u32 val) @@ -324,8 +325,9 @@ static int rpi_touchscreen_get_modes(struct drm_panel *panel) mode = drm_mode_duplicate(drm, m); if (!mode) { - dev_err(drm->dev, "failed to add mode %ux%u@%u\n", - m->hdisplay, m->vdisplay, m->vrefresh); + DRM_DEV_ERROR(drm->dev, + "failed to add mode %ux%u@%u\n", + m->hdisplay, m->vdisplay, m->vrefresh); continue; } @@ -381,7 +383,7 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c, ver = rpi_touchscreen_i2c_read(ts, REG_ID); if (ver < 0) { - dev_err(dev, "Atmel I2C read failed: %d\n", ver); + DRM_DEV_ERROR(dev, "Atmel I2C read failed: %d\n", ver); return -ENODEV; } @@ -390,7 +392,9 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c, case 0xc3: /* ver 2 */ break; default: - dev_err(dev, "Unknown Atmel firmware revision: 0x%02x\n", ver); + DRM_DEV_ERROR(dev, + "Unknown Atmel firmware revision: 0x%02x\n", + ver); return -ENODEV; } @@ -412,8 +416,9 @@ static int rpi_touchscreen_probe(struct i2c_client *i2c, ts->dsi = mipi_dsi_device_register_full(host, &info); if (IS_ERR(ts->dsi)) { - dev_err(dev, "DSI device registration failed: %ld\n", - PTR_ERR(ts->dsi)); + DRM_DEV_ERROR(dev, + "DSI device registration failed: %ld\n", + PTR_ERR(ts->dsi)); return PTR_ERR(ts->dsi); } @@ -457,7 +462,8 @@ static int rpi_touchscreen_dsi_probe(struct mipi_dsi_device *dsi) ret = mipi_dsi_attach(dsi); if (ret) - dev_err(&dsi->dev, "failed to attach dsi to host: %d\n", ret); + DRM_DEV_ERROR(&dsi->dev, + "failed to attach dsi to host: %d\n", ret); return ret; } -- 2.12.0