Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp960396rwe; Thu, 25 Aug 2022 12:23:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR5dIXIlcPezPiHraYeCacWKwCHq6L3E3xHeDMAmK4YoGjLiIJ0OYwJK9yCB3BVAwEo3Dhph X-Received: by 2002:aa7:d1c9:0:b0:446:bfcd:170 with SMTP id g9-20020aa7d1c9000000b00446bfcd0170mr4291361edp.209.1661455412016; Thu, 25 Aug 2022 12:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661455412; cv=none; d=google.com; s=arc-20160816; b=RKedojyfotGXdbgjkXKBWj0+BE46XA94eAPHHs6ShQT6z9ElMb+wxzTE6NCxPXOZd4 f6uRLUSTtZMms+tSCkpclHS+HHbrr/5wiyYDMtrFB6GGwfFa7I8CPplXzkJ4h9i93Fen 9DJjLffGQrDqCZKQOhcTr5/M2QCJ6QwUXF8nJQ/eKbydAwdpEeBupRZh1frGFPQo6WkP 5Emgung/ST4L3iwKM9kP8viQuDv9H2wsqx68KXsidEa/0Lk1Xd/+7OcOsycmjU+q6US0 rYWjpgrce65Rts1utDhK0zGtGOwmHLDSl3XBUpML8EB+mZpkMCeYzHgOK7ABZQUcD56p 8T9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7aq1ly+ESXyHBNWFJ3PkP1RF2ZVzePkNpaK9Wolc0Z8=; b=wontbfKPZVt+5vwX4d+TNoYtfAFCzSvyt8s9codKvxu3+QNI2lJeOPGANxJW7LBA9K VLWEE/x8UFtpvSgTXj7M/XvVgReX1Ti7gfDI7bn7HE1T+VkYGRsZW6gkoQAxHnTZty7A s78GnRJEHyfzkMzu4RoHqhrsGT+RJIUhQcSCk+kpUKJ7PY3wz3yF4osqxZEWyzCCAxg/ meWzcJXjrwnZRWTcpU8KfwZas+r1pdMRJnP6Snv4wffDElePaupybTsg0o1CZmvo4RQI 6DETNP951qWmx2rtPB9vkNR98L1ByCotAkCOL5cPTHqriwxoVUXK+hJ0H0msNwOVkKYX o4AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="PmVU/LPH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u5-20020a509505000000b0044785ed87d7si147904eda.404.2022.08.25.12.23.06; Thu, 25 Aug 2022 12:23:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="PmVU/LPH"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243553AbiHYSxS (ORCPT + 99 others); Thu, 25 Aug 2022 14:53:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243544AbiHYSxQ (ORCPT ); Thu, 25 Aug 2022 14:53:16 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8D83B516C; Thu, 25 Aug 2022 11:53:15 -0700 (PDT) Received: from [192.168.2.145] (109-252-119-13.nat.spd-mgts.ru [109.252.119.13]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id 21A4B6601EAE; Thu, 25 Aug 2022 19:53:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1661453594; bh=35eR4SmNOnxsneefZSjC8myV+5WcAzcuLRSjIAQ0igs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=PmVU/LPHdSBzeOb0JFlglye4sv4VgCDZPPwdyiSWOXfs3Ty+Uh2TIoPGFO3ehQRYR exiL8ZpCMigtP0M2HpdH60t5c+o2s0BqmaXjTZbtI07EoYDHgUmn8VnQ7IgS9ls50B cYU7wrBCQ5bGh/yD6HFaVRo7Z2kcl7l4KJkMG6G3CI/s+1qMPa9+P1ilnQadS4Ck0N kvvKjzVBahduvk+xlkXv3hlXmb+9O2fW/vAs85ejGufbruMaB0Od5ngpWegXmqh8s7 XoOCOIyVMqmpO30lTYNdspi48ssncO8pNfnPpFyCI/75rI6IbvgHaAhmBS8zgSzf63 R4etMaDIM9Muw== Message-ID: <793d9ca8-47af-2f3d-6079-e0bbb8e7d898@collabora.com> Date: Thu, 25 Aug 2022 21:53:09 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] iio: light: tsl2583: Fix module unloading Content-Language: en-US To: Shreeya Patel , jic23@kernel.org, lars@metafoo.de Cc: krisman@collabora.com, kernel@collabora.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220825092048.136973-1-shreeya.patel@collabora.com> From: Dmitry Osipenko In-Reply-To: <20220825092048.136973-1-shreeya.patel@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 8/25/22 12:20, Shreeya Patel wrote: > tsl2583 uses devm_iio_device_register() function and > calling iio_device_unregister() in remove breaks the > module unloading. > Fix this by removing call to iio_device_unregister() > from tsl2583_remove(). > > Signed-off-by: Shreeya Patel Stable and fixes tags are missing > --- > drivers/iio/light/tsl2583.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c > index 82662dab87c0..36c25f79e6a6 100644 > --- a/drivers/iio/light/tsl2583.c > +++ b/drivers/iio/light/tsl2583.c > @@ -878,8 +878,6 @@ static int tsl2583_remove(struct i2c_client *client) > struct iio_dev *indio_dev = i2c_get_clientdata(client); > struct tsl2583_chip *chip = iio_priv(indio_dev); > > - iio_device_unregister(indio_dev); > - > pm_runtime_disable(&client->dev); > pm_runtime_set_suspended(&client->dev); > Driver removal sequence should be opposite to the registration order. Could be better not to use the devm in this case. -- Best regards, Dmitry