From patchwork Fri Apr 17 11:33:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 11494815 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 924C6912 for ; Fri, 17 Apr 2020 11:33:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A8C8207FC for ; Fri, 17 Apr 2020 11:33:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="n75Bzu77" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730280AbgDQLdj (ORCPT ); Fri, 17 Apr 2020 07:33:39 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:51368 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730236AbgDQLdi (ORCPT ); Fri, 17 Apr 2020 07:33:38 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 03HBXV3P032290; Fri, 17 Apr 2020 06:33:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1587123211; bh=35GhlRW/GyAhJvbP4itNdJg1UimlIb8bJAYZzTirSGs=; h=From:To:CC:Subject:Date; b=n75Bzu77UA98MqNJh6z10ap6tx26fqm5obUZS4jtcEFy0E0OQtRcOmQVcayZgEZJM Va9AJcuOciDPZLhnDVmNaBz1GGyz2TkfxT63OV++VbGif0kUAt1Dt1LLt5LwD+y459 8L8lRzAe26LL5zJS4qGMKvWbnm6fRKCHwGsizkZE= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 03HBXVHC066299; Fri, 17 Apr 2020 06:33:31 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Fri, 17 Apr 2020 06:33:30 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Fri, 17 Apr 2020 06:33:30 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 03HBXSSj012787; Fri, 17 Apr 2020 06:33:29 -0500 From: Tomi Valkeinen To: Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , , CC: Tomi Valkeinen Subject: [PATCH 1/5] backlight: led_bl: fix cosmetic issues Date: Fri, 17 Apr 2020 14:33:08 +0300 Message-ID: <20200417113312.24340-1-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Fix issues reported by checkpatch. No functional changes. Signed-off-by: Tomi Valkeinen Reviewed-by: Daniel Thompson --- drivers/video/backlight/led_bl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c index 3f66549997c8..d4e1ce684366 100644 --- a/drivers/video/backlight/led_bl.c +++ b/drivers/video/backlight/led_bl.c @@ -126,7 +126,7 @@ static int led_bl_get_leds(struct device *dev, } static int led_bl_parse_levels(struct device *dev, - struct led_bl_data *priv) + struct led_bl_data *priv) { struct device_node *node = dev->of_node; int num_levels; @@ -148,8 +148,8 @@ static int led_bl_parse_levels(struct device *dev, return -ENOMEM; ret = of_property_read_u32_array(node, "brightness-levels", - levels, - num_levels); + levels, + num_levels); if (ret < 0) return ret; @@ -159,14 +159,15 @@ static int led_bl_parse_levels(struct device *dev, */ db = priv->default_brightness; for (i = 0 ; i < num_levels; i++) { - if ((i && db > levels[i-1]) && db <= levels[i]) + if ((i && db > levels[i - 1]) && db <= levels[i]) break; } priv->default_brightness = i; priv->max_brightness = num_levels - 1; priv->levels = levels; - } else if (num_levels >= 0) + } else if (num_levels >= 0) { dev_warn(dev, "Not enough levels defined\n"); + } ret = of_property_read_u32(node, "default-brightness-level", &value); if (!ret && value <= priv->max_brightness) @@ -208,7 +209,8 @@ static int led_bl_probe(struct platform_device *pdev) props.power = (priv->default_brightness > 0) ? FB_BLANK_POWERDOWN : FB_BLANK_UNBLANK; priv->bl_dev = backlight_device_register(dev_name(&pdev->dev), - &pdev->dev, priv, &led_bl_ops, &props); + &pdev->dev, priv, &led_bl_ops, + &props); if (IS_ERR(priv->bl_dev)) { dev_err(&pdev->dev, "Failed to register backlight\n"); return PTR_ERR(priv->bl_dev);