From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98B3529993F; Wed, 4 Feb 2026 15:18:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770218299; cv=none; b=DVzOwgN/Ou2UNHh+l0bcIYEda6dbqiZPsuPg5RL5PuEDDkDWGLD570uTsNHcbtbr8rrWrycy7ZoGI/2UX401SebPcbJ8NlUQPBWlapX7kSdUsnecWgLD5TEDP1KqqvCVN/x9iBjkxfYn1FEkuMTBDxVdyOEciDVEY7B46lbnzwU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770218299; c=relaxed/simple; bh=6FcdnU3IMQB0Hppjwm8OlAHh3VSpuLZ2WmYQpr4pHVk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NeBXKO52Srqh8QYBZmCJDGaKnewHCSLySPvD5K+LVMWaIkl5ZDJcA+xitAHZQGBtCOulElm5XFoIVYCvKfvQ6UlTIROqY38uxUoZOGrgP0eS/heoDmnmzqNIN1NnNmLtl8+VWFIIS+tqaF2Y2Z7qLh7PlIVOn/32r+bk1agoltU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=H2hjQxwA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="H2hjQxwA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07A3FC116C6; Wed, 4 Feb 2026 15:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770218299; bh=6FcdnU3IMQB0Hppjwm8OlAHh3VSpuLZ2WmYQpr4pHVk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H2hjQxwAEaXZYkZIcAOrOkRjo/w3fy97v5Hv3xWesWRcx8cN9bZriHrRqxNrhu871 U/T0aMbvwqfz4gFF9/T1JO+kGoHOJ3AkEUOQmXI/5xsHYKU9SCKNtX9QZhYPzJy9bP l1UjdbbH9USQGaWMDwC6NkIyz74+Gey07vfmmVJE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Johan Hovold , Krzysztof Kozlowski , Jonathan Cameron , Sasha Levin Subject: [PATCH 6.1 236/280] iio: adc: exynos_adc: fix OF populate on driver rebind Date: Wed, 4 Feb 2026 15:40:10 +0100 Message-ID: <20260204143918.116974590@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260204143909.614719725@linuxfoundation.org> References: <20260204143909.614719725@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold [ Upstream commit ea6b4feba85e996e840e0b661bc42793df6eb701 ] Since commit c6e126de43e7 ("of: Keep track of populated platform devices") child devices will not be created by of_platform_populate() if the devices had previously been deregistered individually so that the OF_POPULATED flag is still set in the corresponding OF nodes. Switch to using of_platform_depopulate() instead of open coding so that the child devices are created if the driver is rebound. Fixes: c6e126de43e7 ("of: Keep track of populated platform devices") Cc: stable@vger.kernel.org # 3.16 Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jonathan Cameron [ Adjust context ] Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/exynos_adc.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c @@ -721,14 +721,7 @@ static const struct iio_chan_spec exynos ADC_CHANNEL(9, "adc9"), }; -static int exynos_adc_remove_devices(struct device *dev, void *c) -{ - struct platform_device *pdev = to_platform_device(dev); - - platform_device_unregister(pdev); - return 0; -} static int exynos_adc_ts_open(struct input_dev *dev) { @@ -929,8 +922,7 @@ static int exynos_adc_probe(struct platf return 0; err_of_populate: - device_for_each_child(&indio_dev->dev, NULL, - exynos_adc_remove_devices); + of_platform_depopulate(&indio_dev->dev); if (has_ts) { input_unregister_device(info->input); free_irq(info->tsirq, info); @@ -959,8 +951,7 @@ static int exynos_adc_remove(struct plat free_irq(info->tsirq, info); input_unregister_device(info->input); } - device_for_each_child(&indio_dev->dev, NULL, - exynos_adc_remove_devices); + of_platform_depopulate(&indio_dev->dev); iio_device_unregister(indio_dev); free_irq(info->irq, info); if (info->data->exit_hw)