From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520AbdBXQOt (ORCPT ); Fri, 24 Feb 2017 11:14:49 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:36211 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478AbdBXQOq (ORCPT ); Fri, 24 Feb 2017 11:14:46 -0500 From: Benjamin Gaignard To: robh+dt@kernel.org, frowand.list@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, vincent.abriou@st.com, dri-devel@lists.freedesktop.org Cc: linaro-kernel@lists.linaro.org, Benjamin Gaignard Subject: [PATCH v2 0/2] Introduce devm_of_platform_populate() helper Date: Fri, 24 Feb 2017 17:14:32 +0100 Message-Id: <1487952874-23635-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org version 2: - simplify function prototype to only keep device as parameter - rebased on v4.10 Lots of calls to of_platform_populate() are not unbalanced by a call to of_platform_depopulate(). This create issues while drivers are bind/unbind. In way to solve those issues is to add devm_of_platform_populate() which will call of_platform_depopulate() when the device is unbound from the bus. This also could make drivers more robust in case that probe failed after calling of_platform_populate(). Benjamin Gaignard (2): of: add devm_ functions for populate and depopulate drm: sti: make driver use devm_of_platform_populate() drivers/gpu/drm/sti/sti_drv.c | 3 +- drivers/of/platform.c | 71 +++++++++++++++++++++++++++++++++++++++++++ include/linux/of_platform.h | 11 +++++++ 3 files changed, 83 insertions(+), 2 deletions(-) -- 1.9.1