From patchwork Wed Oct 2 12:40: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: 174992 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp704890ill; Wed, 2 Oct 2019 05:40:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtfbB3QaDYntjtSYVrVT7/Dje2IjOduor7l6mULjbp9J41ndxezzeFWu5Y4qfSbXwd5+MG X-Received: by 2002:aa7:dcd7:: with SMTP id w23mr3466597edu.170.1570020021280; Wed, 02 Oct 2019 05:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570020021; cv=none; d=google.com; s=arc-20160816; b=Ey1CXKjFbX5J8z5i46u+cHBG7c5BCJX421do4j91XlkvGjU/NFeG1k2Uc/OAm7GCly rVdDfZM0FVP/5qDauIX/3po9kqghaMXuaM0k/Y4aIrZVe4wRARXp5InpvZUZkz2aN4vU f2lrI2VyXlF32IiPEo98bl7YBZ733Mi9eaVfIpydVJCgbfy+GdyE9Wha/MLSana/vY1w v6efWEFQmKG5UJmTh/84GZVbgw6WIHudJLYBy4DJT9VbR28ZiER51L8oo9moozyehpkl RZbJ1zGJlk8tJhGxQhWc3N2UV4PaCIl85Jyl5Yba2ADO1BTDC+3NP6PlfvuOgkbXAsVs Gc3Q== 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=v06VAXtceMbBhHOflWlvtx0T0QpenZBc43NJCGqs8UQ=; b=oJoECFgnsUspt9P59G5zW1hDjh5qJH9cTAaTATJHFc5mMeEIDi/axk5aGVmUNdwOM/ qRLVEjnGe3rTuYgguM41g3VNkm/54N61rZBhD987R9iyttj9N/10dHUoTZOz2uMgWjZC I9NQ4vE+pcU4NsIZF69liNjH2nOT4qdpWCgCuMaoRkNptgeMGEz43+ScIdIgK/Jl1E4B 5tnEkE/zFdkX+paYlwj61WxnWRzC3SHnjUJrl/bNT3KgXAhGiRlPy6FKCSRgo3kPEc8J My7mhk551VSdLMzPsSZGIAsDMLoxMn7BFF0dnT8Je1X6uQsAgYkpFgg6fsKxcX2wRAu7 Z/pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=d5TXeWP8; 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 k7si10392513eja.377.2019.10.02.05.40.20; Wed, 02 Oct 2019 05:40:21 -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=d5TXeWP8; 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 S1727381AbfJBMkK (ORCPT + 27 others); Wed, 2 Oct 2019 08:40:10 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:39174 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727184AbfJBMkH (ORCPT ); Wed, 2 Oct 2019 08:40:07 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce4xp090633; Wed, 2 Oct 2019 07:40:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570020004; bh=v06VAXtceMbBhHOflWlvtx0T0QpenZBc43NJCGqs8UQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=d5TXeWP8fS0Kx4u7iNKS4ngn+E7eAoZIPHXUJtFnCuFKcOliKirJL3rw85/MmsYKt RKroVH6hUyEPoYpDx63BYeGW4xUi6Zd0shhbZ1qNaJTrdA9zgIJcFNNtz+zzjeO8DF sZtCH+6/3ze/UhKyPaoeNZdxpZE1le9b+b0EqwOk= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x92Ce4nq117265 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Oct 2019 07:40:04 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 2 Oct 2019 07:39:53 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE106.ent.ti.com (10.64.6.27) 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, 2 Oct 2019 07:40:04 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x92Ce4Ye002032; Wed, 2 Oct 2019 07:40:04 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v2 3/6] leds: lm3601x: Convert class registration to device managed Date: Wed, 2 Oct 2019 07:40:39 -0500 Message-ID: <20191002124042.25593-3-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191002124042.25593-1-dmurphy@ti.com> References: <20191002124042.25593-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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lm3601x.c b/drivers/leds/leds-lm3601x.c index b02972f1a341..fce89f2a2d92 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); } @@ -445,7 +444,6 @@ static int lm3601x_remove(struct i2c_client *client) { struct lm3601x_led *led = i2c_get_clientdata(client); - led_classdev_flash_unregister(&led->fled_cdev); mutex_destroy(&led->lock); return regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,