Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754645AbeALLu7 (ORCPT + 1 other); Fri, 12 Jan 2018 06:50:59 -0500 Received: from mail-wr0-f174.google.com ([209.85.128.174]:37435 "EHLO mail-wr0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754483AbeALLu5 (ORCPT ); Fri, 12 Jan 2018 06:50:57 -0500 X-Google-Smtp-Source: ACJfBotu4bYQeOCrW5MGiPVDRuMItd487QQNRQMqu0SYe5Q/MV8GWnx82s0FhzDyUVP3hQmp2H64Aw== Date: Fri, 12 Jan 2018 11:50:52 +0000 From: Daniel Thompson To: Enric Balletbo Serra Cc: Enric Balletbo i Serra , Doug Anderson , Pavel Machek , Rob Herring , Jingoo Han , Richard Purdie , Jacek Anaszewski , Brian Norris , Guenter Roeck , Lee Jones , Alexandru Stan , linux-leds@vger.kernel.org, "devicetree@vger.kernel.org" , linux-kernel Subject: Re: [PATCH 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye. Message-ID: <20180112115052.GB3642@birch.example.com> References: <20180110223046.17696-1-enric.balletbo@collabora.com> <20180110223046.17696-4-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Jan 12, 2018 at 11:14:54AM +0100, Enric Balletbo Serra wrote: > > @@ -441,6 +544,26 @@ static int pwm_backlight_probe(struct platform_device *pdev) > > > > dev_dbg(&pdev->dev, "got pwm for backlight\n"); > > > > + if (!data->levels) { > > + /* Get the PWM period (in nanoseconds) */ > > + pwm_get_state(pb->pwm, &state); > > + > > + ret = pwm_backlight_brightness_default(&pdev->dev, data, > > + state.period); > > + if (ret < 0) { > > + dev_err(&pdev->dev, > > + "failed to setup default brightness table\n"); > > + goto err_alloc; > > + } > > + } > > + > > + for (i = 0; i <= data->max_brightness; i++) > > Oops, horrible and unjustifiable mistake, missing { here :/ Well, at least you found it rather than us :-) Daniel.