From patchwork Wed Oct 16 15:59:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176499 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7571857ill; Wed, 16 Oct 2019 09:00:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2oZ5atWIyv3F1N20UH8N5WKVqzpnsQRv9HfIhc0ml8zOSec70OvbEhtGNli/Iw2M6oJIB X-Received: by 2002:aa7:d90d:: with SMTP id a13mr39925009edr.2.1571241643027; Wed, 16 Oct 2019 09:00:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571241643; cv=none; d=google.com; s=arc-20160816; b=gnkmPje6/ZnqlNGVVz5duPQD5wstszN7/z+djVut7KiLZ8BtkG26YCsSy+kMi0VL14 ZbdM6cV8KAnn47rkPLmbd2Cqj9udihy0HkWScQReW1kiJ+BSLaGV7jJQ3qp6d7QsAubn jQHdvCDzsDc2kqB62N9gGWHY4uNrU+vyBuwnY2wfIDynsr7CZuVQq+W5cb3ZgeV5KSkb 719rx4QjnMyyRGWA8Uu5DJcHPVwg6Y67v/h/OlWtjs1g6hv5vSY2sHB8/PfZNGzcUvZ3 1XDKJsu2UG1a5HveJDjakjtI0aJZupyABXk+xNAjPBJqUEMJw/kNy7OYmKt1ujNn9kbs uKFA== 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=J2Vk2Ajsq3pQz40ndtf+q535T0FSNHipw5rnG1vK/ho=; b=NvuPQ71AGjyfo6lJ5chyeEZLKKX5HeHYexKLi4esvCgx2cFMEFWatE/4xhFM/5vNxJ QLS4tDcB/RzJGX+PEPV+TIJeT6C9fy6P0LpZ4LQ7g4OTtW6WqAW/491PDNVtVv+BbKem HVih4ZPMIrojrOtLlnDe76GS5He76y3WH8D8IxsT0vYT5i4p9KUAhoc9UFamxS16mAxq SSGeWDG3E93iQ+vHvLtlW6eT662XDKOL6sfevv/7dIw8aN0AWrX43RKIjY5Kwm+gToU8 RTPKvq2LdX7kiTzY6gcC0++z5M5H8zxkm0ujUsyp2KHWlhR8vv6Z9h0jQj08/iYIvnlm sQPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=mCT66qcW; 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 r3si15697757ejs.439.2019.10.16.09.00.42; Wed, 16 Oct 2019 09:00:43 -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=mCT66qcW; 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 S2405973AbfJPQAk (ORCPT + 26 others); Wed, 16 Oct 2019 12:00:40 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:55610 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393136AbfJPQAe (ORCPT ); Wed, 16 Oct 2019 12:00:34 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9GG0VuH039210; Wed, 16 Oct 2019 11:00:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571241631; bh=J2Vk2Ajsq3pQz40ndtf+q535T0FSNHipw5rnG1vK/ho=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=mCT66qcW52M4j4FAqDhqc132Zj2cmA9m1YpoLY1nRkWidCJaStaZcl0bxZfmmYQ/M ukTuA/sRKbr5ZOXrq0EiSUq90SmOv6LTgNo0YRGDRG0yLQVxrQxyu6HZmaeCPDjyZj xWRWQxI8SJpAlfWPWZPhw6T8LeShDF4Xa8JXRuBU= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9GG0VAM094835 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Oct 2019 11:00:31 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 16 Oct 2019 11:00:24 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE102.ent.ti.com (157.170.170.32) 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; Wed, 16 Oct 2019 11:00:24 -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 x9GG0V8Z096990; Wed, 16 Oct 2019 11:00:31 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v13 12/18] leds: lp55xx: Convert LED class registration to devm_* Date: Wed, 16 Oct 2019 10:59:48 -0500 Message-ID: <20191016155954.29044-13-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191016155954.29044-1-dmurphy@ti.com> References: <20191016155954.29044-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 the LED class registration calls to the LED devm_* registration calls. Signed-off-by: Dan Murphy --- drivers/leds/leds-lp55xx-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c index 44ced02b49f9..824d1d73dde1 100644 --- a/drivers/leds/leds-lp55xx-common.c +++ b/drivers/leds/leds-lp55xx-common.c @@ -181,7 +181,7 @@ static int lp55xx_init_led(struct lp55xx_led *led, led->cdev.name = name; } - ret = led_classdev_register(dev, &led->cdev); + ret = devm_led_classdev_register(dev, &led->cdev); if (ret) { dev_err(dev, "led register err: %d\n", ret); return ret; @@ -502,7 +502,7 @@ void lp55xx_unregister_leds(struct lp55xx_led *led, struct lp55xx_chip *chip) for (i = 0; i < chip->num_leds; i++) { each = led + i; - led_classdev_unregister(&each->cdev); + devm_led_classdev_unregister(each->cdev.dev, &each->cdev); } } EXPORT_SYMBOL_GPL(lp55xx_unregister_leds);