From patchwork Wed Jan 6 13:29:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zheng Yongjun X-Patchwork-Id: 357809 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00, CHARSET_FARAWAY_HEADER, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC5AEC433DB for ; Wed, 6 Jan 2021 13:29:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9072B2311A for ; Wed, 6 Jan 2021 13:29:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725836AbhAFN3w (ORCPT ); Wed, 6 Jan 2021 08:29:52 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:2940 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725803AbhAFN3w (ORCPT ); Wed, 6 Jan 2021 08:29:52 -0500 Received: from dggeme761-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4D9qtY57SJz5DtP; Wed, 6 Jan 2021 21:28:05 +0800 (CST) Received: from dggeme760-chm.china.huawei.com (10.3.19.106) by dggeme761-chm.china.huawei.com (10.3.19.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Wed, 6 Jan 2021 21:29:00 +0800 Received: from dggeme760-chm.china.huawei.com ([10.6.80.70]) by dggeme760-chm.china.huawei.com ([10.6.80.70]) with mapi id 15.01.1913.007; Wed, 6 Jan 2021 21:29:00 +0800 From: zhengyongjun To: "pavel@ucw.cz" , "linux-leds@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "dmurphy@ti.com" Subject: =?gb2312?b?tPC4tDogW1BBVENIIC1uZXh0XSBsZWRzOiB1c2UgcmVzb3VyY2Vf?= =?gb2312?b?c2l6ZQ==?= Thread-Topic: [PATCH -next] leds: use resource_size Thread-Index: AQHW5C6LbmM7OfydzUavCdmmaUI+p6oalxTg Date: Wed, 6 Jan 2021 13:29:00 +0000 Message-ID: <00170346a4824f3a9e159ed5686d0742@huawei.com> References: <20210106131956.968-1-zhengyongjun3@huawei.com> In-Reply-To: <20210106131956.968-1-zhengyongjun3@huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.178.249] MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Sorry, this is my fault, this patch commit msg is wrong, I will send patch v2, please ignore it. -----邮件原件----- 发件人: zhengyongjun 发送时间: 2021年1月6日 21:20 收件人: pavel@ucw.cz; linux-leds@vger.kernel.org; linux-kernel@vger.kernel.org 抄送: dmurphy@ti.com; zhengyongjun 主题: [PATCH -next] leds: use resource_size Use resource_size rather than a verbose computation on the end and start fields. Signed-off-by: Zheng Yongjun --- drivers/leds/leds-lm3642.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) chip->cdev_torch.max_brightness = 8; chip->cdev_torch.brightness_set_blocking = lm3642_torch_brightness_set; chip->cdev_torch.default_trigger = "torch"; - chip->cdev_torch.groups = lm3642_torch_groups, + chip->cdev_torch.groups = lm3642_torch_groups; err = led_classdev_register(&client->dev, &chip->cdev_torch); if (err < 0) { dev_err(chip->dev, "failed to register torch\n"); -- 2.22.0 diff --git a/drivers/leds/leds-lm3642.c b/drivers/leds/leds-lm3642.c index 62c14872caf7..22035a380c4a 100644 --- a/drivers/leds/leds-lm3642.c +++ b/drivers/leds/leds-lm3642.c @@ -339,7 +339,7 @@ static int lm3642_probe(struct i2c_client *client, chip->cdev_flash.max_brightness = 16; chip->cdev_flash.brightness_set_blocking = lm3642_strobe_brightness_set; chip->cdev_flash.default_trigger = "flash"; - chip->cdev_flash.groups = lm3642_flash_groups, + chip->cdev_flash.groups = lm3642_flash_groups; err = led_classdev_register(&client->dev, &chip->cdev_flash); if (err < 0) { dev_err(chip->dev, "failed to register flash\n"); @@ -351,7 +351,7 @@ static int lm3642_probe(struct i2c_client *client,