From patchwork Tue Aug 27 03:03:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13778749 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DE0F7C5321D for ; Tue, 27 Aug 2024 02:57:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=k03d7zRxQmrS40k8orsg3Qh84UlZHwHhOxRMdLjuUeI=; b=2KdVzwANuTMa4Y A0ZWpB9Wk9JkuNfpz3yL9dqHycjATImlSzhCAmUUOCVSLyBlncjQMxdTxm7eFokhucLwbj+mgXz16 8zKg1wQ1RJcKkMnnbzh69oNu2Rpy2QvCxnCcZ78x3cb89NR1fY6tBRznD8M01pT3NU2rj/L4lEEuY e9I2ElpYkrd5G4ui5yXLmWiZYNcAR8QfKf7YnwQRJqtE8Q1XaWGdJchToiS9mdTWxB23OziRqJVHZ MI1HixXmsT9Mxnzpg3Ifef5s7rCWGsO0hjAlNOORXoMEFV5eAD021Jdv1wjY+2w/deirb9VAvdv1Z 6DvqkdqistFbSNMswnKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1simOM-00000009WM8-1hH9; Tue, 27 Aug 2024 02:57:10 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1simNW-00000009W5I-1zrH; Tue, 27 Aug 2024 02:56:20 +0000 Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WtBx23VytzyQT3; Tue, 27 Aug 2024 10:55:18 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id 32148140257; Tue, 27 Aug 2024 10:56:05 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 27 Aug 2024 10:56:04 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , CC: Subject: [PATCH -next v2 1/3] drm/rockchip: Use for_each_child_of_node_scoped() Date: Tue, 27 Aug 2024 11:03:55 +0800 Message-ID: <20240827030357.1006220-2-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827030357.1006220-1-ruanjinjie@huawei.com> References: <20240827030357.1006220-1-ruanjinjie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemh500013.china.huawei.com (7.202.181.146) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_195618_778683_BEDEBD3B X-CRM114-Status: GOOD ( 10.66 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Avoids the need for manual cleanup of_node_put() in early exits from the loop. Signed-off-by: Jinjie Ruan --- drivers/gpu/drm/rockchip/rockchip_lvds.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c index 9a01aa450741..f5b3f18794dd 100644 --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c @@ -548,7 +548,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, struct drm_encoder *encoder; struct drm_connector *connector; struct device_node *remote = NULL; - struct device_node *port, *endpoint; + struct device_node *port; int ret = 0, child_count = 0; const char *name; u32 endpoint_id = 0; @@ -560,15 +560,13 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, "can't found port point, please init lvds panel port!\n"); return -EINVAL; } - for_each_child_of_node(port, endpoint) { + for_each_child_of_node_scoped(port, endpoint) { child_count++; of_property_read_u32(endpoint, "reg", &endpoint_id); ret = drm_of_find_panel_or_bridge(dev->of_node, 1, endpoint_id, &lvds->panel, &lvds->bridge); - if (!ret) { - of_node_put(endpoint); + if (!ret) break; - } } if (!child_count) { DRM_DEV_ERROR(dev, "lvds port does not have any children\n"); From patchwork Tue Aug 27 03:03:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13778761 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E93F4C5321D for ; Tue, 27 Aug 2024 02:58:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n8c7EKswiiNSvD70dTuRPNBb5PapIj9LpwCZcJHGiW8=; b=ak/hMqNwEl0Cve MTKkZldL6CDbBnEMIprlD8DamDLgVJTTaOGJfmBelk7MuqJtYPBGPd0j09WuZGFoH/xU8GLLnfb4C bGnuRQ9ML0BWZhzOvIJUNCYRFd+b88VUa0EEiyxtrmuGtElUwCgKxqmmzNEdeKsRK0V5l6gJ4MmQi oZiC6ZfExMibD2V/BcZeS/Lw7venh3NfpnMU85QQWFqh7Pn8bCTRbxIiqbSHFC08OhHaz3cEJRcKF zywQ3SUS9yYPx2IhGEAD3p7CbRvEmsSh2XOsXdaDGWCY38qr0DJPyqPEU3FGl/opaUIcVPAQ/IXr1 GV+LB9p1tKvJy8DZmZPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1simP7-00000009WWf-2y9m; Tue, 27 Aug 2024 02:57:57 +0000 Received: from szxga08-in.huawei.com ([45.249.212.255]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1simNW-00000009W5L-1xYu; Tue, 27 Aug 2024 02:56:20 +0000 Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4WtBx32WTPz16PFX; Tue, 27 Aug 2024 10:55:19 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id BC2C718007C; Tue, 27 Aug 2024 10:56:05 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 27 Aug 2024 10:56:05 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , CC: Subject: [PATCH -next v2 2/3] drm/rockchip: Simplified with dev_err() and __free() Date: Tue, 27 Aug 2024 11:03:56 +0800 Message-ID: <20240827030357.1006220-3-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827030357.1006220-1-ruanjinjie@huawei.com> References: <20240827030357.1006220-1-ruanjinjie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemh500013.china.huawei.com (7.202.181.146) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_195619_062730_7AAA8569 X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Avoid need to manually handle of_node_put() by using __free(), and use dev_err() to replace deprecated() DRM_DEV_ERROR(), which can simplfy code. Signed-off-by: Jinjie Ruan --- drivers/gpu/drm/rockchip/rockchip_lvds.c | 38 ++++++++---------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c index f5b3f18794dd..700ac730887d 100644 --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c @@ -548,16 +548,14 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, struct drm_encoder *encoder; struct drm_connector *connector; struct device_node *remote = NULL; - struct device_node *port; int ret = 0, child_count = 0; const char *name; u32 endpoint_id = 0; lvds->drm_dev = drm_dev; - port = of_graph_get_port_by_id(dev->of_node, 1); + struct device_node *port __free(device_node) = of_graph_get_port_by_id(dev->of_node, 1); if (!port) { - DRM_DEV_ERROR(dev, - "can't found port point, please init lvds panel port!\n"); + dev_err(dev, "can't found port point, please init lvds panel port!\n"); return -EINVAL; } for_each_child_of_node_scoped(port, endpoint) { @@ -569,13 +567,10 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, break; } if (!child_count) { - DRM_DEV_ERROR(dev, "lvds port does not have any children\n"); - ret = -EINVAL; - goto err_put_port; - } else if (ret) { - dev_err_probe(dev, ret, "failed to find panel and bridge node\n"); - goto err_put_port; - } + dev_err(dev, "lvds port does not have any children\n"); + return -EINVAL; + } else if (ret) + return dev_err_probe(dev, ret, "failed to find panel and bridge node\n"); if (lvds->panel) remote = lvds->panel->dev->of_node; else @@ -587,7 +582,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, lvds->output = rockchip_lvds_name_to_output(name); if (lvds->output < 0) { - DRM_DEV_ERROR(dev, "invalid output type [%s]\n", name); + dev_err(dev, "invalid output type [%s]\n", name); ret = lvds->output; goto err_put_remote; } @@ -599,7 +594,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, lvds->format = rockchip_lvds_name_to_format(name); if (lvds->format < 0) { - DRM_DEV_ERROR(dev, "invalid data-mapping format [%s]\n", name); + dev_err(dev, "invalid data-mapping format [%s]\n", name); ret = lvds->format; goto err_put_remote; } @@ -610,8 +605,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, ret = drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_LVDS); if (ret < 0) { - DRM_DEV_ERROR(drm_dev->dev, - "failed to initialize encoder: %d\n", ret); + dev_err(drm_dev->dev, "failed to initialize encoder: %d\n", ret); goto err_put_remote; } @@ -624,8 +618,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, &rockchip_lvds_connector_funcs, DRM_MODE_CONNECTOR_LVDS); if (ret < 0) { - DRM_DEV_ERROR(drm_dev->dev, - "failed to initialize connector: %d\n", ret); + dev_err(drm_dev->dev, "failed to initialize connector: %d\n", ret); goto err_free_encoder; } @@ -639,9 +632,8 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, connector = drm_bridge_connector_init(lvds->drm_dev, encoder); if (IS_ERR(connector)) { - DRM_DEV_ERROR(drm_dev->dev, - "failed to initialize bridge connector: %pe\n", - connector); + dev_err(drm_dev->dev, "failed to initialize bridge connector: %pe\n", + connector); ret = PTR_ERR(connector); goto err_free_encoder; } @@ -649,14 +641,12 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, ret = drm_connector_attach_encoder(connector, encoder); if (ret < 0) { - DRM_DEV_ERROR(drm_dev->dev, - "failed to attach encoder: %d\n", ret); + dev_err(drm_dev->dev, "failed to attach encoder: %d\n", ret); goto err_free_connector; } pm_runtime_enable(dev); of_node_put(remote); - of_node_put(port); return 0; @@ -666,8 +656,6 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master, drm_encoder_cleanup(encoder); err_put_remote: of_node_put(remote); -err_put_port: - of_node_put(port); return ret; } From patchwork Tue Aug 27 03:03:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13778762 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1302AC5472D for ; Tue, 27 Aug 2024 02:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0okoXl+PYPK+QRzGqyJJCC80HhJaECZRiwOM1BPsqzo=; b=nnaQ93q3N8ZSdo Bg4P+nMBLiEe02GdmMLbhmOHsmJe/VSo+qBteESLRzO3ulJdGSvsjnRwcbFhTo58HkUONqZhohERU gqYM9fVUNdpe7ceQ/QxCC1g9zqEHjogsoFh8WG+YcE24y8mMDCStyBWt13AKHBErZla4n+MxH8+qk WtCQ91NUy3h08IRAjeR0P3XxIRym7HQIi6XfD4QjiE+PplSMxU8Uyz+Nvn/KpSoefNshqxX9rlh9a DFta99x4/DkUNLNLmaqPwWHTKFrDBPZStd3MuLKGB/h6MYHAj0DJ1LoHDqMv1DM7uIt0wqWbK14XN jRhAUhFMrs7u7xwISmMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1simPr-00000009We9-3k9I; Tue, 27 Aug 2024 02:58:43 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1simNW-00000009W5M-3KB5; Tue, 27 Aug 2024 02:56:21 +0000 Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WtBxP3NmTzyRDP; Tue, 27 Aug 2024 10:55:37 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id 52FEA18007C; Tue, 27 Aug 2024 10:56:06 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 27 Aug 2024 10:56:05 +0800 From: Jinjie Ruan To: , , , , , , , , , , , , , CC: Subject: [PATCH -next v2 3/3] drm/rockchip: Simplified with dev_err_probe() Date: Tue, 27 Aug 2024 11:03:57 +0800 Message-ID: <20240827030357.1006220-4-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240827030357.1006220-1-ruanjinjie@huawei.com> References: <20240827030357.1006220-1-ruanjinjie@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemh500013.china.huawei.com (7.202.181.146) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_195619_412465_A05142B3 X-CRM114-Status: GOOD ( 10.80 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Use dev_err_probe to replace deprecated() DRM_DEV_ERROR(), which can simplfy code. Signed-off-by: Jinjie Ruan --- drivers/gpu/drm/rockchip/rockchip_lvds.c | 30 +++++++++--------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_lvds.c b/drivers/gpu/drm/rockchip/rockchip_lvds.c index 700ac730887d..92679e54c71d 100644 --- a/drivers/gpu/drm/rockchip/rockchip_lvds.c +++ b/drivers/gpu/drm/rockchip/rockchip_lvds.c @@ -455,10 +455,8 @@ static int rk3288_lvds_probe(struct platform_device *pdev, return PTR_ERR(lvds->regs); lvds->pclk = devm_clk_get(lvds->dev, "pclk_lvds"); - if (IS_ERR(lvds->pclk)) { - DRM_DEV_ERROR(lvds->dev, "could not get pclk_lvds\n"); - return PTR_ERR(lvds->pclk); - } + if (IS_ERR(lvds->pclk)) + return dev_err_probe(lvds->dev, PTR_ERR(lvds->pclk), "could not get pclk_lvds\n"); lvds->pins = devm_kzalloc(lvds->dev, sizeof(*lvds->pins), GFP_KERNEL); @@ -467,24 +465,22 @@ static int rk3288_lvds_probe(struct platform_device *pdev, lvds->pins->p = devm_pinctrl_get(lvds->dev); if (IS_ERR(lvds->pins->p)) { - DRM_DEV_ERROR(lvds->dev, "no pinctrl handle\n"); + dev_err(lvds->dev, "no pinctrl handle\n"); devm_kfree(lvds->dev, lvds->pins); lvds->pins = NULL; } else { lvds->pins->default_state = pinctrl_lookup_state(lvds->pins->p, "lcdc"); if (IS_ERR(lvds->pins->default_state)) { - DRM_DEV_ERROR(lvds->dev, "no default pinctrl state\n"); + dev_err(lvds->dev, "no default pinctrl state\n"); devm_kfree(lvds->dev, lvds->pins); lvds->pins = NULL; } } ret = clk_prepare(lvds->pclk); - if (ret < 0) { - DRM_DEV_ERROR(lvds->dev, "failed to prepare pclk_lvds\n"); - return ret; - } + if (ret < 0) + return dev_err_probe(lvds->dev, ret, "failed to prepare pclk_lvds\n"); return 0; } @@ -700,22 +696,18 @@ static int rockchip_lvds_probe(struct platform_device *pdev) lvds->grf = syscon_regmap_lookup_by_phandle(dev->of_node, "rockchip,grf"); - if (IS_ERR(lvds->grf)) { - DRM_DEV_ERROR(dev, "missing rockchip,grf property\n"); - return PTR_ERR(lvds->grf); - } + if (IS_ERR(lvds->grf)) + return dev_err_probe(dev, PTR_ERR(lvds->grf), "missing rockchip,grf property\n"); ret = lvds->soc_data->probe(pdev, lvds); - if (ret) { - DRM_DEV_ERROR(dev, "Platform initialization failed\n"); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "Platform initialization failed\n"); dev_set_drvdata(dev, lvds); ret = component_add(&pdev->dev, &rockchip_lvds_component_ops); if (ret < 0) { - DRM_DEV_ERROR(dev, "failed to add component\n"); + dev_err(dev, "failed to add component\n"); clk_unprepare(lvds->pclk); }