From: Tomi Valkeinen <tomi.valkeinen@ti.com> To: Lee Jones <lee.jones@linaro.org>, Daniel Thompson <daniel.thompson@linaro.org>, Jingoo Han <jingoohan1@gmail.com>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Subject: [PATCHv2 1/4] backlight: led_bl: fix cosmetic issues Date: Tue, 21 Apr 2020 12:46:26 +0000 [thread overview] Message-ID: <20200421124629.20977-2-tomi.valkeinen@ti.com> (raw) In-Reply-To: <20200421124629.20977-1-tomi.valkeinen@ti.com> Fix issues reported by checkpatch. No functional changes. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> --- 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); -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com> To: Lee Jones <lee.jones@linaro.org>, Daniel Thompson <daniel.thompson@linaro.org>, Jingoo Han <jingoohan1@gmail.com>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, <dri-devel@lists.freedesktop.org>, <linux-fbdev@vger.kernel.org> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Subject: [PATCHv2 1/4] backlight: led_bl: fix cosmetic issues Date: Tue, 21 Apr 2020 15:46:26 +0300 [thread overview] Message-ID: <20200421124629.20977-2-tomi.valkeinen@ti.com> (raw) In-Reply-To: <20200421124629.20977-1-tomi.valkeinen@ti.com> Fix issues reported by checkpatch. No functional changes. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> --- 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); -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-04-21 12:46 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-21 12:46 [PATCHv2 0/4] led-backlight cleanups & fixes Tomi Valkeinen 2020-04-21 12:46 ` Tomi Valkeinen 2020-04-21 12:46 ` Tomi Valkeinen [this message] 2020-04-21 12:46 ` [PATCHv2 1/4] backlight: led_bl: fix cosmetic issues Tomi Valkeinen 2020-04-21 12:46 ` [PATCHv2 2/4] backlight: led_bl: drop useless NULL initialization Tomi Valkeinen 2020-04-21 12:46 ` Tomi Valkeinen 2020-04-21 12:46 ` [PATCHv2 3/4] backlight: led_bl: add led_access locking Tomi Valkeinen 2020-04-21 12:46 ` Tomi Valkeinen 2020-04-21 12:46 ` [PATCHv2 4/4] backlight: led_bl: fix led -> backlight brightness mapping Tomi Valkeinen 2020-04-21 12:46 ` Tomi Valkeinen 2020-04-21 15:47 ` Daniel Thompson 2020-04-21 15:47 ` Daniel Thompson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200421124629.20977-2-tomi.valkeinen@ti.com \ --to=tomi.valkeinen@ti.com \ --cc=b.zolnierkie@samsung.com \ --cc=daniel.thompson@linaro.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=jingoohan1@gmail.com \ --cc=lee.jones@linaro.org \ --cc=linux-fbdev@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.