From patchwork Tue Oct 1 18:04:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174918 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8889816ill; Tue, 1 Oct 2019 11:04:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIByNquLcv5TdhZu0pq9S6aBeYKijC1TMo2ev/lDFgWRZKkvf1++36FLBIkLjyTrXFAfEO X-Received: by 2002:a50:852c:: with SMTP id 41mr26303728edr.201.1569953066719; Tue, 01 Oct 2019 11:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569953066; cv=none; d=google.com; s=arc-20160816; b=oqLCMZtOVpU21CnNKqhaJ7GX+obSAcCoj1nnvfANAblCFIqf/lXtdAA/Gddvo1dNdK AknJ8YsWKBTRhRHddSA/fsDl2nPYkLMGpk6av4ARtgIrx6gbEWO8+yyCsulcwsafvE5B Dzql7PHKFzHb7c4Qd4URQy3Jrn/LieQSeBhPeeVL6bLnfsiK6CiLzPF0INWZPw7w3XWS rHU58aNj0yXTFDdJ7bYj2232CrxrdDwybbQedjah0aoNIVB2gVOlYzTp0vlkfYyIClJq xQPBxcSMTXYhkwm6SjgEdjFVLh2Cd57SA1N99C6ibClHhC4YVu6055tCVa4URGDlcP6s 7fAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=G5dE59ax181azOisHSqvm9h6ieZKUV+zX+MgaCfGHj8=; b=isPDMe/DvaICxKVJexXuY9chlBUgCEuBBkQbb2k2nsfH47CWYHxvdFAToKXxtI0t3C CQrR74e3Ffi7MbaVlWCTXT073RtJhWUdMN2904UNR2wHc4s+vxnuL8xZjuwAm/1nyPK+ ZinU85qc7Xp1UjMRbZ1GFbWqFTzWJvI+ObyONdKCgJfRQAKWEfBP99I+VUKIJFZecNTL tKZDEc+qVkxQXahwABgpk3034GW+om5hWxiTlUoiJiY0q4LpIULk5OvZ7/fBVFzD9GYy BBKI4BJdRiYOX4wTAbz1MvR+S7EzZjTtsZUcLyBj1I9nAwWJm5xuBR2grHSkod/bwX1J 1MhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=X1HMrt9O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14si9146397edq.49.2019.10.01.11.04.26; Tue, 01 Oct 2019 11:04:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=X1HMrt9O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731504AbfJASEY (ORCPT + 27 others); Tue, 1 Oct 2019 14:04:24 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:34464 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727176AbfJASEX (ORCPT ); Tue, 1 Oct 2019 14:04:23 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x91I4Jkq062621; Tue, 1 Oct 2019 13:04:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569953059; bh=G5dE59ax181azOisHSqvm9h6ieZKUV+zX+MgaCfGHj8=; h=From:To:CC:Subject:Date; b=X1HMrt9OTxUASF5Eq5yoPjn/G0KYc+DRpOtRUiPAQ3ubsafzXgbrAs1kADn37a94A Y2YAna15WGq6j4VpCmEyzJ0T+Uh0sq9xxYUoNM8JB1J+byGxzjV+El5fT4JNKCGnQc y2wnEYU0cySaXwMFPokhcl68ZbpClrWjW5BPG9FY= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x91I4JMW036201 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 1 Oct 2019 13:04:19 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 1 Oct 2019 13:04:19 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 1 Oct 2019 13:04:08 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x91I4IBK061630; Tue, 1 Oct 2019 13:04:18 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH 1/5] leds: Kconfig: Be consistent with the usage of "LED" Date: Tue, 1 Oct 2019 13:04:35 -0500 Message-ID: <20191001180439.8312-1-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update the Kconfig to be consistent in the case of using "LED" in the Kconfig. LED is an acronym and should be capitalized. Signed-off-by: Dan Murphy --- drivers/leds/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 6e7703fd03d0..4b68520ac251 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -17,7 +17,7 @@ if NEW_LEDS config LEDS_CLASS tristate "LED Class Support" help - This option enables the led sysfs class in /sys/class/leds. You'll + This option enables the LED sysfs class in /sys/class/leds. You'll need this to do anything useful with LEDs. If unsure, say N. config LEDS_CLASS_FLASH @@ -35,7 +35,7 @@ config LEDS_BRIGHTNESS_HW_CHANGED depends on LEDS_CLASS help This option enables support for the brightness_hw_changed attribute - for led sysfs class devices under /sys/class/leds. + for LED sysfs class devices under /sys/class/leds. See Documentation/ABI/testing/sysfs-class-led for details. From patchwork Tue Oct 1 18:04:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174919 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8889884ill; Tue, 1 Oct 2019 11:04:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKe/Q1KU082tdsCJUUJUxeQiWv2tzVTHxuzn8Ywz0k+QNYLQrhx+kkDHaQbCtDHB5L19Th X-Received: by 2002:a17:906:278a:: with SMTP id j10mr25126846ejc.228.1569953070185; Tue, 01 Oct 2019 11:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569953070; cv=none; d=google.com; s=arc-20160816; b=jnn3ya/aD9Qu0KN7mUQ+clVYLhpbhw8gdg/+8wzY0G46gE2n7BmRIg4LbymCoyk4zz tIg+zEYEm8Vz/bdefWhWKEZ0xgJkkrYD5/M//Sb/RNoeitrwvtvvNT7JKbQ+gwpnklqT YQ1UIdIQe8iupLbuz/drc0DlvPkUzWDpXToisDnu73q3YJx0DbCZUhk7cVeiNqdpKZ3S J4/6oelWkVFJsyWt+qKzuWMR8xvCmOqKD0rUAil7iTy17Pqzuw0hqP6Vq2flDUe4F6Tb dsqA1fjEgmj7V8wsuIv2n8Dd6vTfkpXiWs+cWPcl7qMNnTIrSPp0luBfc57ax0gvyliW FrvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0MAAkXKcdPthxYixT0lj3t8FWR9F4q7jJ98gke/CcJo=; b=i4o9Z5ST7xD+xarIqy8T84qXlXhLjs6u4AGlf/7omZPeySKSoxYwwLM0dwNQjA0iOc 71gRckZQ/iGCMXo0j+hGuqo9mKPjCoYkzl9tu2ns7RyChoxpBaaoDX+BVcYeKgUYtt7j CJqpwG+mZ57gAZiTT/+Vpzth032kD7BGcYHRDAv2a5UW6u//3UxuOOMFKExDWiYfN/NZ CmoyKc5xvowMyw49djWVVFYqCFIzjVPsrq14g8ns6G/AT3VhmOcHT/2+/JYEv1prXQzZ 9F4rzOF/tOL6QT7DpGpKvpAgANJ2+FXsYPTcqn8K+Uy2kOHFcSoB3ol9RI0BUncDFa/3 AlsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=StMs0bl1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14si9146397edq.49.2019.10.01.11.04.29; Tue, 01 Oct 2019 11:04:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=StMs0bl1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731553AbfJASE3 (ORCPT + 27 others); Tue, 1 Oct 2019 14:04:29 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37686 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727055AbfJASEY (ORCPT ); Tue, 1 Oct 2019 14:04:24 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x91I4Koq039874; Tue, 1 Oct 2019 13:04:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569953060; bh=0MAAkXKcdPthxYixT0lj3t8FWR9F4q7jJ98gke/CcJo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=StMs0bl1+he7hgTa+KETPq8KbTJZT2gH68TxrzgITmj9KTgKHJfnGHpIT9MUqTnAL YWUzO72oiq0cZh43Jq83UC674vxiZyIRRqlM4j/zTQVbBgKsJPRzRr9ut2dZ1kkUC0 saKoVjxuk735m4xFonoUoB2iito5kATs64UTHPGs= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x91I4KeC025102 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 1 Oct 2019 13:04:20 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 1 Oct 2019 13:04:19 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 1 Oct 2019 13:04:19 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x91I4J4E061654; Tue, 1 Oct 2019 13:04:19 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH 4/5] leds: flash: Add devm_* functions to the flash class Date: Tue, 1 Oct 2019 13:04:38 -0500 Message-ID: <20191001180439.8312-4-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191001180439.8312-1-dmurphy@ti.com> References: <20191001180439.8312-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the missing device managed API for registration and unregistration for the LED flash class. Signed-off-by: Dan Murphy --- drivers/leds/led-class-flash.c | 50 +++++++++++++++++++++++++++++++++ include/linux/led-class-flash.h | 14 +++++++++ 2 files changed, 64 insertions(+) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/led-class-flash.c b/drivers/leds/led-class-flash.c index 60c3de5c6b9f..c2b4fd02a1bc 100644 --- a/drivers/leds/led-class-flash.c +++ b/drivers/leds/led-class-flash.c @@ -327,6 +327,56 @@ void led_classdev_flash_unregister(struct led_classdev_flash *fled_cdev) } EXPORT_SYMBOL_GPL(led_classdev_flash_unregister); +static void devm_led_classdev_flash_release(struct device *dev, void *res) +{ + led_classdev_flash_unregister(*(struct led_classdev_flash **)res); +} + +int devm_led_classdev_flash_register_ext(struct device *parent, + struct led_classdev_flash *fled_cdev, + struct led_init_data *init_data) +{ + struct led_classdev_flash **dr; + int ret; + + dr = devres_alloc(devm_led_classdev_flash_release, sizeof(*dr), + GFP_KERNEL); + if (!dr) + return -ENOMEM; + + ret = led_classdev_flash_register_ext(parent, fled_cdev, init_data); + if (ret) { + devres_free(dr); + return ret; + } + + *dr = fled_cdev; + devres_add(parent, dr); + + return 0; +} +EXPORT_SYMBOL_GPL(devm_led_classdev_flash_register_ext); + +static int devm_led_classdev_flash_match(struct device *dev, + void *res, void *data) +{ + struct fled_cdev **p = res; + + if (WARN_ON(!p || !*p)) + return 0; + + return *p == data; +} + +void devm_led_classdev_flash_unregister(struct device *dev, + struct led_classdev_flash *fled_cdev) +{ + WARN_ON(devres_release(dev, + devm_led_classdev_flash_release, + devm_led_classdev_flash_match, fled_cdev)); +} +EXPORT_SYMBOL_GPL(devm_led_classdev_flash_unregister); + static void led_clamp_align(struct led_flash_setting *s) { u32 v, offset; diff --git a/include/linux/led-class-flash.h b/include/linux/led-class-flash.h index 1bd83159fa4c..21a3358a1731 100644 --- a/include/linux/led-class-flash.h +++ b/include/linux/led-class-flash.h @@ -113,6 +113,20 @@ static inline int led_classdev_flash_register(struct device *parent, */ void led_classdev_flash_unregister(struct led_classdev_flash *fled_cdev); +int devm_led_classdev_flash_register_ext(struct device *parent, + struct led_classdev_flash *fled_cdev, + struct led_init_data *init_data); + + +static inline int devm_led_classdev_flash_register(struct device *parent, + struct led_classdev_flash *fled_cdev) +{ + return devm_led_classdev_flash_register_ext(parent, fled_cdev, NULL); +} + +void devm_led_classdev_flash_unregister(struct device *parent, + struct led_classdev_flash *fled_cdev); + /** * led_set_flash_strobe - setup flash strobe * @fled_cdev: the flash LED to set strobe on From patchwork Tue Oct 1 18:04:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174921 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp8890058ill; Tue, 1 Oct 2019 11:04:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaXaRcQJQq2O8aXw++9NmAVdDM2cQwRKc+Nr09kFpH1I+GgOPl84Kt1R/Igx0LHJXGWdOH X-Received: by 2002:aa7:cd5a:: with SMTP id v26mr26701269edw.256.1569953078365; Tue, 01 Oct 2019 11:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569953078; cv=none; d=google.com; s=arc-20160816; b=mEMyfzkCvyEF/wL+Xx9d/TUeAjKzXruko9Jt9kdGNe3aC49MJHT9kkle7LRTdJiD5O UhGbkkrsRmLUj4NN/xlo/zCDUS9jk7MoU/miDXxKEyG69GsG+4mlqRyTambPm+oeS7+X DbC4IyGZcXDHedmTEsuh4KCr+rxiOq8j/Vx3wXU6jlfTZ5Tzwul6L9BnhXaGVxcmcsJZ 7zHwFVmuDAKL6il3g75r296kXkM9L8ElYd4PbuKYjOgH7v0KVt2xH+XoAq9Z5zFVfGm6 N7tmWMRVguvmOXFzBiQctKrPbZ2ot+59JQa3E7cCAB6xu5eWacENmz+WtKQBpdYwx1u9 iyaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WT/P1mEnJj8WBgXcn3xJJ5zXtDgJwUFTqbvfHlc/1d4=; b=Ke/bL40/OGhPilETmL/AIDqEdxNhJ13mMedfVPexAcIC2DfGC4gkISdsMjhrkwgWWF HakHuhKZucuzUkawBdJBBeAGSmF1SjjBMdMP2OHFIfCM4/A1950qaNdnCM9dXvKbhCJR GTgA+y1AoJ/ThaANDfdQG4sZgzKSvfFN3R8apzapwuAloKf8WiEQWcXia1j5jPLd2Xm4 Sdh792nd0YCz98IOAGl7b0iiFW0DnAG7Rkz37iTzVCP6pdmAAWZtunXohIVQFzqCv6D4 W+5NcC8m+b+XSp5E38z++d6AsGDGRidmQhoe4y27Wsl8H26561tXZLqNkrGzkoNdWsSV 1fyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OOXuR11S; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si9533284edp.400.2019.10.01.11.04.38; Tue, 01 Oct 2019 11:04:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=OOXuR11S; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731734AbfJASEg (ORCPT + 27 others); Tue, 1 Oct 2019 14:04:36 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37684 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727269AbfJASEY (ORCPT ); Tue, 1 Oct 2019 14:04:24 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x91I4KD6039878; Tue, 1 Oct 2019 13:04:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569953060; bh=WT/P1mEnJj8WBgXcn3xJJ5zXtDgJwUFTqbvfHlc/1d4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OOXuR11SyBzFS6yxZ4SvKUl3JFco8sOVmcUwsszet4vV6w64xazynBXFD3A03SrYI VVVzBtAiMoUU2qyPLBqnjYEoLkRMbArd9C2Je9E6iUpjRJKq8tK8gxZnTlohgq2dEs YS6WqBY2VjAoIYscmP1sPwpuUveXBipundRcI7UU= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x91I4K30037723; Tue, 1 Oct 2019 13:04:20 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 1 Oct 2019 13:04:09 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Tue, 1 Oct 2019 13:04:09 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x91I4J9b126184; Tue, 1 Oct 2019 13:04:19 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH 5/5] leds: lm3601x: Convert class registration to device managed Date: Tue, 1 Oct 2019 13:04:39 -0500 Message-ID: <20191001180439.8312-5-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191001180439.8312-1-dmurphy@ti.com> References: <20191001180439.8312-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert LED flash class registration to device managed class registration API. Signed-off-by: Dan Murphy --- drivers/leds/leds-lm3601x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lm3601x.c b/drivers/leds/leds-lm3601x.c index b02972f1a341..a68e4f97739c 100644 --- a/drivers/leds/leds-lm3601x.c +++ b/drivers/leds/leds-lm3601x.c @@ -350,8 +350,7 @@ static int lm3601x_register_leds(struct lm3601x_led *led, init_data.devicename = led->client->name; init_data.default_label = (led->led_mode == LM3601X_LED_TORCH) ? "torch" : "infrared"; - - return led_classdev_flash_register_ext(&led->client->dev, + return devm_led_classdev_flash_register_ext(&led->client->dev, &led->fled_cdev, &init_data); }