From patchwork Sun May 6 08:02:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 10382651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B50DC60318 for ; Sun, 6 May 2018 08:03:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A708A287DC for ; Sun, 6 May 2018 08:03:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A6472881C; Sun, 6 May 2018 08:03:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A9CE287DC for ; Sun, 6 May 2018 08:03:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751180AbeEFIC5 (ORCPT ); Sun, 6 May 2018 04:02:57 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:47418 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbeEFICw (ORCPT ); Sun, 6 May 2018 04:02:52 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 850C58046D; Sun, 6 May 2018 10:02:50 +0200 (CEST) Date: Sun, 6 May 2018 10:02:50 +0200 From: Pavel Machek To: kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, sre@kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org, gshark.jeong@gmail.com, m.chehab@samsung.com, sakari.ailus@iki.fi, linux-media@vger.kernel.org Subject: [PATCH] media: i2c: lm3560: use conservative defaults Message-ID: <20180506080250.GA24114@amd> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If no pdata is found, we should use lowest current settings, not highest. Signed-off-by: Pavel Machek diff --git a/drivers/media/i2c/lm3560.c b/drivers/media/i2c/lm3560.c index b600e03a..c4e5ed5 100644 --- a/drivers/media/i2c/lm3560.c +++ b/drivers/media/i2c/lm3560.c @@ -420,14 +434,14 @@ static int lm3560_probe(struct i2c_client *client, pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL); if (pdata == NULL) return -ENODEV; - pdata->peak = LM3560_PEAK_3600mA; - pdata->max_flash_timeout = LM3560_FLASH_TOUT_MAX; + pdata->peak = LM3560_PEAK_1600mA; + pdata->max_flash_timeout = LM3560_FLASH_TOUT_MIN; /* led 1 */ - pdata->max_flash_brt[LM3560_LED0] = LM3560_FLASH_BRT_MAX; - pdata->max_torch_brt[LM3560_LED0] = LM3560_TORCH_BRT_MAX; + pdata->max_flash_brt[LM3560_LED0] = LM3560_FLASH_BRT_MIN; + pdata->max_torch_brt[LM3560_LED0] = LM3560_TORCH_BRT_MIN; /* led 2 */ - pdata->max_flash_brt[LM3560_LED1] = LM3560_FLASH_BRT_MAX; - pdata->max_torch_brt[LM3560_LED1] = LM3560_TORCH_BRT_MAX; + pdata->max_flash_brt[LM3560_LED1] = LM3560_FLASH_BRT_MIN; + pdata->max_torch_brt[LM3560_LED1] = LM3560_TORCH_BRT_MIN; } flash->pdata = pdata; flash->dev = &client->dev;