From patchwork Mon May 29 15:45:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100677 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp396021qge; Mon, 29 May 2017 08:49:38 -0700 (PDT) X-Received: by 10.84.198.36 with SMTP id o33mr78030054pld.145.1496072978682; Mon, 29 May 2017 08:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072978; cv=none; d=google.com; s=arc-20160816; b=A1/WeZCm/djPtTQm3SEmegRQ54QT7YtPVLHEEEFtwcX2ijFds9sKR29o3y/ETJBHIu FUAdrFxD64FD9sGellBP041mvFYFC/l7HbDtA11SGkN4lytTHhvamz9C1x6oGzBiNIGw fjPqZunr/e+EN6BUYyLVjhbsO6D0Raq0QEdDWfWY8BSswyDhDqLKuAi/n062ZgsI3Pgu 8EBHy+e8FbjFSRFumh+CfHQY723bP+7AJvD5tiUh0mDV2xalWj/99BVIcI0QcKwPcj6w /jaeCj1PJCidz1s5e7b6EOaeItTef/TBd4Nk/H0LZeemIEEcb/UGFRYeSSuDsfQZjF31 7zKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=g4PWDjjctS8Uz1yoNsOy1bNV3TnUZ0UJSyPTTRyJ4q8=; b=ibvj49VSVWWaCZLTMS+AJK82CF/39EI6ugjhkt9oj//P7wjKpJ4JMFvKrANNerVYXq dY4/+INLr4cv/p2wu3pm0VnXiY6vJ/ZA4q2CwkvNXUHWyHfMwCXHdVY7J1Enywuv0Yy7 MFWC1lazbnGsmlJ++r0Tf5KCuh9QicEGaFCYKlHI0GOQgmJYOgjBdcdJZvd6aR2vaO1K 2y6ibcY4nBGWGnxYxNUqrqKZvgsSZujw5y6jlXUXB23mVP7qFlHgs//lyitQnL7gIoq3 zvC6wvhMBACMAVxE7XRO1wnw2wRbj5Sn40EIADryCO5dfQlLKGYZbvNVj61vHGcwvsU/ 2MTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si10396197pga.419.2017.05.29.08.49.38; Mon, 29 May 2017 08:49:38 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751428AbdE2Ptg (ORCPT + 25 others); Mon, 29 May 2017 11:49:36 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38200 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751074AbdE2Pq1 (ORCPT ); Mon, 29 May 2017 11:46:27 -0400 Received: by mail-wm0-f53.google.com with SMTP id e127so65976897wmg.1 for ; Mon, 29 May 2017 08:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g4PWDjjctS8Uz1yoNsOy1bNV3TnUZ0UJSyPTTRyJ4q8=; b=AQrLZJ/q4FJfRGNJvOZ5JR6+M8F/234fq6dacw4qes+KNHXzCkEHEo96ZTSQ0uLl6R A/eCJ6d82u3QPqmDezBNZT1bltwQkiE5RXEpIge++UsqMJB25ZmHof/YssFhbauMAcUn i65ZegC+Ip3dtWaoMnC5nGMYVnW1m79QJ/dzg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=g4PWDjjctS8Uz1yoNsOy1bNV3TnUZ0UJSyPTTRyJ4q8=; b=pqsZUPaQEKqe92eB/XzGtIag9Hjp8rNNGcZ4SlQNe/T8T7OWy6E7ecxT0vH3caVRNi cssE/EQGORgGVFCo4pDD1Et1W0AGrQj70lNm5UzW1cJ44bMYRHdYA2ZrkWrjtOeNlsdt /jURvvfCQaErYkru9+XmaKSHmcFnYZCfPqhRlvV+AirTzSJsWm4Aq7sxHZw7KIJh4Im9 uDualMXKW41NiLKIW2+piwOLP/xZr4rvdOb/jHCLeXYOzNj8p0cZwH+D+swWro0Y6v9D pibTUOBCn8arJLXYYjPdH4zkKvIziSgaALSfjtk4Piwc5X1fcyToX2Hx3gWgnIOLd2cH PoTQ== X-Gm-Message-State: AODbwcBzlMEq2w1bHuScQtHDblz8fO3FeE0FFM+iH4C+GC4NzBujvcxS FQqIh3Ya1p2X/J9N X-Received: by 10.223.155.144 with SMTP id d16mr10615857wrc.202.1496072785753; Mon, 29 May 2017 08:46:25 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:24 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Alexandre Torgue , Fabrice Gasnier , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/15] iio: adc: stm32: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:49 +0200 Message-Id: <1496072763-31209-2-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() instead of of_platform_populate and of_platform_depopulate to simplify driver code Signed-off-by: Benjamin Gaignard CC: Jonathan Cameron CC: Hartmut Knaack CC: Lars-Peter Clausen CC: Alexandre Torgue CC: Fabrice Gasnier CC: linux-iio@vger.kernel.org CC: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org --- drivers/iio/adc/stm32-adc-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c index 22b7c93..46e41dc5 100644 --- a/drivers/iio/adc/stm32-adc-core.c +++ b/drivers/iio/adc/stm32-adc-core.c @@ -186,7 +186,6 @@ static void stm32_adc_irq_remove(struct platform_device *pdev, static int stm32_adc_probe(struct platform_device *pdev) { struct stm32_adc_priv *priv; - struct device_node *np = pdev->dev.of_node; struct resource *res; int ret; @@ -249,7 +248,7 @@ static int stm32_adc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, &priv->common); - ret = of_platform_populate(np, NULL, NULL, &pdev->dev); + ret = devm_of_platform_populate(&pdev->dev); if (ret < 0) { dev_err(&pdev->dev, "failed to populate DT children\n"); goto err_irq_remove; @@ -274,7 +273,6 @@ static int stm32_adc_remove(struct platform_device *pdev) struct stm32_adc_common *common = platform_get_drvdata(pdev); struct stm32_adc_priv *priv = to_stm32_adc_priv(common); - of_platform_depopulate(&pdev->dev); stm32_adc_irq_remove(pdev, priv); clk_disable_unprepare(priv->aclk); regulator_disable(priv->vref); From patchwork Mon May 29 15:45:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100664 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395067qge; Mon, 29 May 2017 08:46:46 -0700 (PDT) X-Received: by 10.98.12.142 with SMTP id 14mr18257779pfm.66.1496072806440; Mon, 29 May 2017 08:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072806; cv=none; d=google.com; s=arc-20160816; b=bLJCy5eWAMmQZmv+tzH79LvGngqD26TMILJn277dvR0oDOvABkGNB9lTwHA4ZS2CZM P3YxDpK5BKbc4pdFeIWj+MaAOZQWDxWRSuJfKxA5Mm58NdCKvVOiN7GumFkWu1KZO4H1 Ry++DXr9cA2Zexqi7i4OL0U3nJrg1wAS8rKfjjUMNMwewkdPYxsWeTM985io7kjb5oEL 7Z4mj7U+2/75Rgv0gsL3p5tLYRPkk+pPVcjB3EPdWN22fKfNIvAm9uS+qMtjh+uAM5zn VwpR1TOtOEmEsx0KseINsagLQ0U2bl95bPhw63O9AATSNEMUL65dxWNcA2XlnGVOc3KR N+YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=LfCxnRYpyIFtj2DIgA6P+Qne5iAcXJr+DQWGUeh3xJw=; b=MTARJkh8RkR6yQYNotI9jyeiO8BdLpYz4e9Vf0tkpXdkHhNceFFbUKUPrQ+kYJ8r+Y 2fCywkLKSmV6OAMiZQFKe/rmTZi4o98k27M1OLDBFOyoH8CHCUkKq2R3c4Q4XcOZzz0/ YsrxCYP8vR3bAENKQZIZliEDe2nLodP1am9uZsSWQBmr2d92LjiS9/OKoHVm5Bqr2qYx pLuRXkwRjEJPaRGHAgN8Sw1DCSnwu3FYGIbSORh0yuzrx5tFoOUQnLtlNb5xng9HAqWr 0mlL8JSMhR71EncXHgKsm63/Kj7ZavKjTNmIzFMpgt5KCCc92LaahU/z8F7BO1GoVOVs ie+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o82si10870846pfi.82.2017.05.29.08.46.46; Mon, 29 May 2017 08:46:46 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751205AbdE2Pqb (ORCPT + 25 others); Mon, 29 May 2017 11:46:31 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:36040 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbdE2Pq3 (ORCPT ); Mon, 29 May 2017 11:46:29 -0400 Received: by mail-wm0-f52.google.com with SMTP id 7so60655842wmo.1 for ; Mon, 29 May 2017 08:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LfCxnRYpyIFtj2DIgA6P+Qne5iAcXJr+DQWGUeh3xJw=; b=EGYkgc5RRo2vQHPEwvK9UhuV/Iue/MhfsahWnMoeHPBxOw1XgwSW75gl7tq3IxBhAA 9zSrK2FBZpw5akaKHwrN50zcyF0f+H6dcSAMv8sM22cGflbXcVOyVR5+CbxOwGDW5Png 12aTS+oNv7XmETSHdjUpCaHlxJ7p4VcMXbhEo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LfCxnRYpyIFtj2DIgA6P+Qne5iAcXJr+DQWGUeh3xJw=; b=B3F6Ym/1BCOMz7r8w+40fb+1vMbUshTiXL3TTSoaGk4LWkUdIAPPwUmWgQ6eFJ6Kgf Zod2a3F0TsFdcNnbcytYl84vjyXPEgMbJA49d1Nj/OMNBvJy1Qyn/3vbepV7lE9qFbKI WhEopHEg8RoIXcP4b+WWbqunVNt74LDFVDm2/PGMdBqmUb5+iT5OCcPJnKhlxhTsW5RY vQeCl17BRqfxqlN9QA3U7qS85OZnjaZ6gLpOl0In0JZPjgLJ6lWyZlIL8Ctmdxku+Dh5 t++pNjhIDp1Fa4cPoIn71VCkjGj7vfUIOH6hIF9ldS+NFPu6BusNbpp5HAbBVigGILfP pkmA== X-Gm-Message-State: AODbwcDVcfOq90G+zTn06wteJIl10tbTr5Nom9CtS363Hn/bvK9xV9Au STvD4P6D93HtH2nM X-Received: by 10.223.170.142 with SMTP id h14mr10425866wrc.140.1496072787586; Mon, 29 May 2017 08:46:27 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:27 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Alexandre Torgue , Fabrice Gasnier , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/15] iio: dac: stm32: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:50 +0200 Message-Id: <1496072763-31209-3-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() instead of of_platform_populate and of_platform_depopulate to simplify driver code Signed-off-by: Benjamin Gaignard CC: Jonathan Cameron CC: Hartmut Knaack CC: Lars-Peter Clausen CC: Alexandre Torgue CC: Fabrice Gasnier CC: linux-iio@vger.kernel.org CC: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org --- drivers/iio/dac/stm32-dac-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/iio/dac/stm32-dac-core.c b/drivers/iio/dac/stm32-dac-core.c index 75e4878..9c42537 100644 --- a/drivers/iio/dac/stm32-dac-core.c +++ b/drivers/iio/dac/stm32-dac-core.c @@ -130,7 +130,7 @@ static int stm32_dac_probe(struct platform_device *pdev) platform_set_drvdata(pdev, &priv->common); - ret = of_platform_populate(pdev->dev.of_node, NULL, NULL, dev); + ret = devm_of_platform_populate(&pdev->dev); if (ret < 0) { dev_err(dev, "failed to populate DT children\n"); goto err_pclk; @@ -151,7 +151,6 @@ static int stm32_dac_remove(struct platform_device *pdev) struct stm32_dac_common *common = platform_get_drvdata(pdev); struct stm32_dac_priv *priv = to_stm32_dac_priv(common); - of_platform_depopulate(&pdev->dev); clk_disable_unprepare(priv->pclk); regulator_disable(priv->vref); From patchwork Mon May 29 15:45:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100665 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395073qge; Mon, 29 May 2017 08:46:47 -0700 (PDT) X-Received: by 10.84.135.129 with SMTP id 1mr77216885plj.57.1496072806833; Mon, 29 May 2017 08:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072806; cv=none; d=google.com; s=arc-20160816; b=tgnkrhncpU3aJyT3fRakr3vtk1LACtm0SzA50DtGUvCipwBh6O6Vpf1NwhjkGyA4md ArolvTcEijR4D4QnMxOt4aG5hHuRRRmrjwFNbucJi05JrBXlT4KXqTLZNrk9oNtp+UUt CUFOOaPzbf6MyoMKPJfTZtdzDW4m2mw/hQ8ao6AoetH8Vs8xYryF0JCyvRaF6CGvmsPq RyLxkVQe6+3INq2Yqu4eFO9CTWxodn1igwns/RtvCSH7iqOtUn+LjHDkibvqcFYPdTTW icZa7YR5Fi7zCDWKwiRQynRrllr97JSK26amEz5v9CGlNI04dNK8YulzPIrDCGKacVW2 7r4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=K/uWNx3F/MXl+yvFxtAp8QUqo6J8cCy6nXjOC0BY+KA=; b=MRHjCKVR+0uImEpI7UijPwHwya8RPi8i8a4dhe8lBPAvr58aQN0T7uNaMSZpx6tYrK ewAf9zotZ0syeE7G56bqF7c3dPY7szB68tR0doGQO8JkAjrKuoX99n8PMCDuGRS0X4Of xTn58KkQCLFL9cgW1IULHLotk92WKy43FnMgZYKeeYlznvCyRgZAOm9fLKKl+4/5+RYg PLI7rDGGCf9+qXWYZ0rsmRF21rrWVF+NVDk+2Gm/mjSHGA5gzybnac/2JoFsDEqQvmbR 6uLij0lR4tvAnBLHzhspa/Uf+RwxypDLZkuiYFcnc2yTVAmi63IWXFnNX8Ng0ZcKbo4+ FBbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o82si10870846pfi.82.2017.05.29.08.46.46; Mon, 29 May 2017 08:46:46 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751239AbdE2Pqe (ORCPT + 25 others); Mon, 29 May 2017 11:46:34 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:36962 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbdE2Pqb (ORCPT ); Mon, 29 May 2017 11:46:31 -0400 Received: by mail-wm0-f45.google.com with SMTP id d127so64528411wmf.0 for ; Mon, 29 May 2017 08:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K/uWNx3F/MXl+yvFxtAp8QUqo6J8cCy6nXjOC0BY+KA=; b=MK0h+2cktcPRlEkdFf0dak2fiTFGAyc/5BtIlEqUftzWNCzqNuiRe6GnhUg74L2m1S uRriaE6NvIgD7DhYnBkNoJnFyQjbWu7mZpWS/qE71JdIEEL5EsVnfD+cRRTvV5/md8iw wf1pFVC6+gGTPHUXm5pnSqfy0BQH1tOVNnNx0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K/uWNx3F/MXl+yvFxtAp8QUqo6J8cCy6nXjOC0BY+KA=; b=IhYu1gwQ/2yibndnrO9fR8LPGqSYKPt02uc+PWFsjzPqPJrnfmgaciWHuvUgHXRz7F xK5Y0EwC1/4GNGFFuJ+xHmApBDmyijmty8U4aRo5n2uAfS8/VyZ3vUS9NWnCadoyIVGj 8Z4aTZUsXNQNDZMJdL2zwVez+ErucuQDjIzbS2k/+3jo0Xp1HqfvLl2e0vEDBopChilp FrZNhjgj6b0CuZXZKpKWKoOTtLFFO2w249r3ehFEM+tX38OWDgM0EOQdXje8b3VEn93l slL+ChJhZ7dYkqtKMpSEzCSgp0ClWDwwAHh6jjbrE7Vh9uk73VKMt3ISrVXMMoePH6mI JJ6Q== X-Gm-Message-State: AODbwcAo30NbVbaBqTUJiA7Yniqg64y0VkXJkn+oqoj9WaXRemMAjj+o 0l3ZFZtFwYiW+fCpHFJE8jqA X-Received: by 10.223.134.22 with SMTP id 22mr10224155wrv.182.1496072790587; Mon, 29 May 2017 08:46:30 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:30 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Rob Clark , David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/15] drm: msm: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:52 +0200 Message-Id: <1496072763-31209-5-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() to simplify driver code. Signed-off-by: Benjamin Gaignard CC: Rob Clark CC: David Airlie CC: linux-arm-msm@vger.kernel.org CC: dri-devel@lists.freedesktop.org CC: freedreno@lists.freedesktop.org CC: linux-kernel@vger.kernel.org --- drivers/gpu/drm/msm/msm_drv.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) -- 1.9.1 diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 87b5695..545fb6f 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -969,7 +969,7 @@ static int add_display_components(struct device *dev, * to our components list. */ if (of_device_is_compatible(dev->of_node, "qcom,mdss")) { - ret = of_platform_populate(dev->of_node, NULL, NULL, dev); + ret = devm_of_platform_populate(dev); if (ret) { dev_err(dev, "failed to populate children devices\n"); return ret; @@ -978,7 +978,6 @@ static int add_display_components(struct device *dev, mdp_dev = device_find_child(dev, NULL, compare_name_mdp); if (!mdp_dev) { dev_err(dev, "failed to find MDSS MDP node\n"); - of_platform_depopulate(dev); return -ENODEV; } @@ -992,11 +991,7 @@ static int add_display_components(struct device *dev, mdp_dev = dev; } - ret = add_components_mdp(mdp_dev, matchptr); - if (ret) - of_platform_depopulate(dev); - - return ret; + return add_components_mdp(mdp_dev, matchptr); } /* @@ -1072,7 +1067,6 @@ static int msm_pdev_probe(struct platform_device *pdev) static int msm_pdev_remove(struct platform_device *pdev) { component_master_del(&pdev->dev, &msm_drm_ops); - of_platform_depopulate(&pdev->dev); return 0; } From patchwork Mon May 29 15:45:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100676 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395929qge; Mon, 29 May 2017 08:49:18 -0700 (PDT) X-Received: by 10.99.132.194 with SMTP id k185mr19711194pgd.43.1496072958053; Mon, 29 May 2017 08:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072958; cv=none; d=google.com; s=arc-20160816; b=0egRiHaNl5oJweJlBi+9acH8+O5XesC91nOWvNiIDbLx0GanAb6qN0KiZ4+W8BWbFr KatWqt3LliHlCckIvf/kQBMIv5YqunKfMK/0ym5MzrKu5fNqsyZrnXbKKFrSl3U1lUll xqWLa/Ys9udLMJFsrU1RidCNi3tJkBCqMn78i06ZE9McecgMIySXAr+janZR6UcR+RCd MYJLo9mBltCD/lg/NkhVrRgrePdTue2Ta+ZV+4/6DR0J4CAkW3wkVKsoYEQ/ljxWAgJy zwQehS0R5nKpRXcGxSea1tBtCOPRCkgoSjN5WVfp/hMYueFHC/QIzGRnP0iXFtvNkuHD mkpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=Pth/HfPsIQdhDvSrNnj3yp0zryImczUFWeU0DtUteTM=; b=BQLpVwaIKXazi0/QyOcv9NvMv0HJU3jLOYgZnJzYBoQLzZT6rO7wnGmSCw+5CepTW2 5gEoYy2SDgkr/l+cPbDnzBErAdUSZq3UmZuOKGWkze9SzJr+aqI1LS66Mt8QtEyPlj8D qPEp+hkjf4LwNcdoHDsk6Y/Pu6g8h3B5BhenoSFw5FEU7kb/AlQCQx9dLb8qZ+fUR9vQ UDYZVsLlwBRKPJ4v0zDGByISBPzW/G72Q/8d2Y57CoegiokJ7CavFfgvw4zRHj+IIvAN sW5NM/AvMuNYNBervKomvI8ZrISj4Zq/AuzmYfp4ZEdO5hwtBWIrz2XvvN4Te55l4dKl xJnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si10396197pga.419.2017.05.29.08.49.17; Mon, 29 May 2017 08:49:18 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751352AbdE2PtB (ORCPT + 25 others); Mon, 29 May 2017 11:49:01 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:34076 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbdE2Pqd (ORCPT ); Mon, 29 May 2017 11:46:33 -0400 Received: by mail-wm0-f53.google.com with SMTP id 123so20772733wmg.1 for ; Mon, 29 May 2017 08:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Pth/HfPsIQdhDvSrNnj3yp0zryImczUFWeU0DtUteTM=; b=GyCE6+vjyOBhbnQRcmp0bEGogAP3pxzNFdMq2CndOY19kFCxFrNg8f3KnsA8WkHudW hhUS+kEHEimIBVMm16xkb+fn576BBeKw5nn0DXBPYClgRW1K4gIPEEldjCcfj6RuTAAm +2fWBWUb5XL6IgY465ehl4SSvH2p6qtI3NZlQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Pth/HfPsIQdhDvSrNnj3yp0zryImczUFWeU0DtUteTM=; b=SU+KPlEipB4CiwhzwkOHzq18dvrF3fj+kXPRrCcsA3MGd/NN/TmioifNwh9QzW+U0T zmd7cwesl1zqySHKntK5nQx+krxwEW4NmL+t2CUUK1TKlooy3ymMmDqjT7hqCD6UBkoL idv2jN5U2xapX4mbp0RfBWcY6+BMRUrWrx7KrkG3y+aeZLwi7VauYeSdgr/daPIqaUrk rmng8+7XOALrpfCshr9QTTd7prLbhMAUt2vuqd/4FVJK4DyTflxJVUQkcd/aVUKAj+qb xIeuwBGCEnTiFO6kaZ/8HGrkBEeh9qo5HOFFyJpzjs6elJ6wuJhdxK8hE7OMeLPEf7UZ l/AQ== X-Gm-Message-State: AODbwcBGbXfzrAWmOrzpRdRX2DHcJKzM2QgX7Fv90OYeFvHehvR79UHF 11f68A/T8v/uJY0x X-Received: by 10.223.179.199 with SMTP id x7mr12357855wrd.72.1496072792000; Mon, 29 May 2017 08:46:32 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:31 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , Alexandre Torgue , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/15] mfd: stm32-timers: use devm_of_platform_populate Date: Mon, 29 May 2017 17:45:53 +0200 Message-Id: <1496072763-31209-6-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() instead of of_platform_populate() and suppress stm32_timers_remove() which become useless. Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: Alexandre Torgue CC: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org --- drivers/mfd/stm32-timers.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 1.9.1 diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c index 2182f00..a6675a4 100644 --- a/drivers/mfd/stm32-timers.c +++ b/drivers/mfd/stm32-timers.c @@ -58,14 +58,7 @@ static int stm32_timers_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ddata); - return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); -} - -static int stm32_timers_remove(struct platform_device *pdev) -{ - of_platform_depopulate(&pdev->dev); - - return 0; + return devm_of_platform_populate(&pdev->dev); } static const struct of_device_id stm32_timers_of_match[] = { @@ -76,7 +69,6 @@ static int stm32_timers_remove(struct platform_device *pdev) static struct platform_driver stm32_timers_driver = { .probe = stm32_timers_probe, - .remove = stm32_timers_remove, .driver = { .name = "stm32-timers", .of_match_table = stm32_timers_of_match, From patchwork Mon May 29 15:45:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100675 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395923qge; Mon, 29 May 2017 08:49:17 -0700 (PDT) X-Received: by 10.99.119.7 with SMTP id s7mr19368049pgc.143.1496072957361; Mon, 29 May 2017 08:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072957; cv=none; d=google.com; s=arc-20160816; b=y6lwVQ6gRSm3CwwUKJWQhXyKOj1iKJKH0+zhbHmJtwtqnqn0Db3BLq2UCN05oj63H2 occmEZorjTFykaiQT6NWIkzntPhWoH7xEfoIKBsD6VUGFwTfamAoZuRPfSD6lx+aw+BZ ZMFTl5VDqglYmy8QYU72mkInaf6iiXr96NZulVDZ4BTP9wjSLpkRmAXXQdiJFrwsWSMj hN1DS5Px410BIQuu2XxNxy9ColjKM7gCCTNlch4M24Sex0oACzkH5LZEh1bpyDjPuNrC XjJ/+WZ0FAloN9NWYHCGlwjwbRTn3Wug6aFxoYFMSnADs3h8TaZU/nuGgqQUkVkUUD/y HOzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=QKhoW6giTHva3mEdTARScU7EIHAt8wWzTlIefmYZVb0=; b=stw46CFU0s5hcU+NcDuSzHsD7vU0kmBVjf2kZew5/mm3ewLurE1ZXSnwLUa61yf2WS hmnP9vtz8aQKZD2LpEKctKQT95ZK1EXV9ozk8jqqzIbx5x/DaJ1NKT/pDOtXUIou4gdK AU+ho26tjFKfEJdnZW8z7aGXqTvqv60mvBEJv1nQAJkeRY1qpM+3p81C4ZGQrnK4m5M7 73S52rw0rw6uEZQlvWFgxjm3AwZrZkX/0z9bWpP6JJs5HagnjoqH4pHruZsJ152xPi6G Vzejxp6E3oGQjbJjGdqBBYhvHZKzuLZ+iMA/bgU2aiG1IgCAvsdhq5/7rwF7EyvvEujy Q37A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si10396197pga.419.2017.05.29.08.49.17; Mon, 29 May 2017 08:49:17 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751272AbdE2Pqg (ORCPT + 25 others); Mon, 29 May 2017 11:46:36 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:35314 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbdE2Pqe (ORCPT ); Mon, 29 May 2017 11:46:34 -0400 Received: by mail-wm0-f49.google.com with SMTP id b84so60808197wmh.0 for ; Mon, 29 May 2017 08:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QKhoW6giTHva3mEdTARScU7EIHAt8wWzTlIefmYZVb0=; b=PhsRwp5H8QsMZUDdcUHyBrwcsvClMcLVpfIK+QaQlTmPJZc1rIaXB+QLznAHhuqyEK LhZVlf+89W5pnyhKIRsNlhTbYuBMeaTP4NBgjJaznj252XpJzOMsr2smLPLW3oBvPpD1 4AM9wm1pq2/ipRUguEEbHTMopdkAYZeX6WJNM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QKhoW6giTHva3mEdTARScU7EIHAt8wWzTlIefmYZVb0=; b=oan4BoS5bKnx1JSu0WcbBJT/ZxulWvy4aHH2CUphmNxIae1Y36/oeZLAdkWvAMTn6J V7hN0X+Rp/K64Bd+Wt4/5/IZ6fI71vzVW/YhqUz0/A1K1/BspXqnSDpoNnrq3rXugYAr CiaZ4GYBbQqDQK1D5FVLSttwCq6rlxRo8+VOVpW5xM/Dbk1bQBcxwz80Wg+kugvLn3lM m7fd8ACBpx97FhoiWRsfyasA3dqBW1xduGiMuZWPZ72ZqhkVBL4HaIddMIqMDUVBOWQd mQ67b/f8HOu7av8hhQW1Cc/BYyaGHMg3Qb5+ilQPFVvaOlTsjBj8/N9DUMLq4AmN9/mn A8YQ== X-Gm-Message-State: AODbwcDkCiwqMm/5HL1aSPHDRT5aSGYFIf+Ri4Z7hFrwUcK85fSHk6hq 12w+MJJX+m98re2XmBjl2pbN X-Received: by 10.28.17.143 with SMTP id 137mr22742416wmr.52.1496072793123; Mon, 29 May 2017 08:46:33 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:32 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 06/15] mfd: atmel: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:54 +0200 Message-Id: <1496072763-31209-7-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/atmel-flexcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/mfd/atmel-flexcom.c b/drivers/mfd/atmel-flexcom.c index e8e67be..064bde9 100644 --- a/drivers/mfd/atmel-flexcom.c +++ b/drivers/mfd/atmel-flexcom.c @@ -80,7 +80,7 @@ static int atmel_flexcom_probe(struct platform_device *pdev) clk_disable_unprepare(clk); - return of_platform_populate(np, NULL, NULL, &pdev->dev); + return devm_of_platform_populate(&pdev->dev); } static const struct of_device_id atmel_flexcom_of_match[] = { From patchwork Mon May 29 15:45:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100674 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395664qge; Mon, 29 May 2017 08:48:30 -0700 (PDT) X-Received: by 10.84.137.3 with SMTP id 3mr76430660plm.68.1496072910107; Mon, 29 May 2017 08:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072910; cv=none; d=google.com; s=arc-20160816; b=isb24dVi3lXc/C7MkwQKxD4012YSU0h9j+QNc5TwdNpXQ89ZLtzW40xJUBLdFl1Ucu LJm02uicBwhp5d/wr7kpQfv6tDvbeAApMjz6b6B3QWqPyURRGimlTo6jqybQ0s625JWH 1TiQx1ldwrR522BsiAyp12IFrss3I5Cg0JQVbVzHaKCNiZHrl5g+EopPl2COZLVUOp6c M6FjslwA6TgY93QDHoJXOwPcggwslFoToETI9OLmJiy8QuCGpZRNzSlwhfmmm3z/P1Ib P0tOalf72nqELufNqkeFfoTApfYJ2Chz7JQmc90GPvnIcRTzVWJq98ZW3mLS8cosBa7s uCbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=SDpFi6O6wtsS+hwRjfN6oHZJ5RBPo44/WiuhSnTuw8g=; b=MgDSfK2BFDQRLXRoS5C9/3a2EVyoA0TYUtiVMNK9TctINcjIKVvtaPjxwrTGv6moSv /Ya/Un9QjBDQNiC2prTt7luf03S8SszhMpFfG8bw8ZgoqYfXw+3dUVXiXpHtu/T67ULU LIWRhc5STYs13lDswOP7Oa0tO3FKg5DqFbmYcqTb/CD4kxLyDPz+kd4VY3puzZBzBoUn IWQaiSr8ywLC40PDjpyCUGzN7Yyqbr11VtpywKTHZkDi0pvzWDqlp/qfZkOr833b2746 CLUsKDDwBC2nolo1DzMJB5+JBks9D5/OJuGAJbv6gMdUzMbRr6NQXYBI013OAs3In3RU N2UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u140si10322095pgb.25.2017.05.29.08.48.29; Mon, 29 May 2017 08:48:30 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751473AbdE2PsW (ORCPT + 25 others); Mon, 29 May 2017 11:48:22 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37074 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308AbdE2Pqk (ORCPT ); Mon, 29 May 2017 11:46:40 -0400 Received: by mail-wm0-f46.google.com with SMTP id d127so64530662wmf.0 for ; Mon, 29 May 2017 08:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SDpFi6O6wtsS+hwRjfN6oHZJ5RBPo44/WiuhSnTuw8g=; b=IkqJFCt/tUJGaGh8WstZS3/535gpJ8lNUpQMdCekXdMTHFx1cYHESSVx2txRqs3vYk 0YZNoFkGDMuPAVfZbeaXoshL+4uAuCKSF2tCAwyyo14boyfcm50lQaKSF0MDZifR2tuY TD53E9Xy4n4nsS+yz/qVk2zdpnoKj12VSEhdk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SDpFi6O6wtsS+hwRjfN6oHZJ5RBPo44/WiuhSnTuw8g=; b=eYAqtyUus/OF9uQcK74rKkRaHQyNionN9B5bMGXo9ISaGinmNziF2Yf/Jz3zaYWpsa lVLNEtT8JXarXPvvDHHJQFjoLGs0w5Ar5lgV5oGkkqo09qkowAAUEFjLvRaHrLLs0ac7 i0llhlk4A510tNon1UoxaHtO6MwSWWyV/Hoz1c41jPlUHg1vTCRqLRLQRgvbzEtB/TbV IDAxRpS4T2pJ25njQ7a2guQtA2GRhiavNDPP0qzr+83HtQUu5ZwlLJaThOrsrbVa13tN CZVrhT+j7y6EXN0orYXWqqCVd5F29iYBHE8jje4fWHiATVt8tVwh3cxN0dCZAkBzE89T 1xsQ== X-Gm-Message-State: AODbwcCMa7d7aArIjwd+sqaU30ywmqYsoXbOiVXX7U0TEztlTin2Fkp5 zHaKIs/4dvMJmTR3 X-Received: by 10.223.134.22 with SMTP id 22mr10224333wrv.182.1496072794419; Mon, 29 May 2017 08:46:34 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:33 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 07/15] mfd: cros_ec: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:55 +0200 Message-Id: <1496072763-31209-8-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/cros_ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c index d4a407e..e31ac60 100644 --- a/drivers/mfd/cros_ec.c +++ b/drivers/mfd/cros_ec.c @@ -147,7 +147,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev) } if (IS_ENABLED(CONFIG_OF) && dev->of_node) { - err = of_platform_populate(dev->of_node, NULL, NULL, dev); + err = devm_of_platform_populate(dev); if (err) { mfd_remove_devices(dev); dev_err(dev, "Failed to register sub-devices\n"); From patchwork Mon May 29 15:45:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100672 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395429qge; Mon, 29 May 2017 08:47:47 -0700 (PDT) X-Received: by 10.98.16.28 with SMTP id y28mr18537107pfi.163.1496072867501; Mon, 29 May 2017 08:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072867; cv=none; d=google.com; s=arc-20160816; b=HLQVBHNpnmwxqh7rl/zyXwyD3XACDhi1QEayBui10w2Y826GcXH8YuSRNhZThAkkNt gktY0AIa3RTNyXap61IxFhXZ5NivmFKOqi+hP911yM/GnKWmm+hBaisSmOHLIMZ9ZPho QXbEQrIzYl9daOvuFRONTGIB3aUQLnL86R6Hqxe/lVIiHVn0qiSqokN83BYed64TM7wU uAdjOUhdaTZOBMztCg2v6UJo0eYQP2F1EpWWUJwn12FvGAOaGaFsKEw5DjCcJNp34cQt MncdX+sCp5u2TWiMkcrLa4XiZwvngFIwbn3JbLLAvi4pkM8EMRn/04ZV8eYVkInHj2EY /bTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=PshoKH7pJlJI6XWm4nqIlUGhuNefaJ9a2VV5+3DuBcY=; b=ReJE0QVNUDHp6YIRRZAEE1WC0gdNwejA9fLmFmrWPQKaCyXLh0azqpk46jro0Hrfxh ysaLG/bghgysH7n79ettbwcPaFpJEvOKPqS/h8q8jV+pAD+KNHF+uN5/qFIbOdTHt4Ku OH7OsErkhjGdNM3c8DpX/O91A5wHRF3MALUzUoHCxnUxOmPbWCeF3elPw6lKOn8FB57U muyFG5KoexuNSZu0RvxIIPBTYyqq4Kf1unS/U0AgxvD3wowWtAc3clTx6sRyKEdKomUT iE+dWfmyddkRPv6NVT+SXGsZy1Cy2ZZ+47J/GIGRiIZWErOeamc7gbW28bkQDDsNdsNL 17+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si10879805pfd.358.2017.05.29.08.47.47; Mon, 29 May 2017 08:47:47 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751449AbdE2Prd (ORCPT + 25 others); Mon, 29 May 2017 11:47:33 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37119 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751361AbdE2Pqr (ORCPT ); Mon, 29 May 2017 11:46:47 -0400 Received: by mail-wm0-f46.google.com with SMTP id d127so64531468wmf.0 for ; Mon, 29 May 2017 08:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PshoKH7pJlJI6XWm4nqIlUGhuNefaJ9a2VV5+3DuBcY=; b=OdSzOtrsKV9OlJY0y7fSSKh1v6gLCoox1Zk+V5MLLPCIRDVWkuFqQ5ty0tYfbGYBRk exaTL0ue95Vd60DMFJx5CqYQw4ItUz/LAvPJvdKtOmLwF8+9KYrGpqIeiDZdOqA5vtP7 J+V5UApjch0wrokfQzhKjsWJJKLvYHnhwKQw4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PshoKH7pJlJI6XWm4nqIlUGhuNefaJ9a2VV5+3DuBcY=; b=haSdrd9cGfFZz8ECqH4JI+2TgbQBIRozYCVgYTcdYOsxQsKPM3DRcqSk/GPP42pUt+ 3UTyx2PBXMASiEFYP7rfFUTQOwOtT7ts5/gtwky7V3Ey+gCq49FV/qpgE+hJYrI9AVDw eZ3zWGPzriXWIfy+y+Vrz3afjKiukKm389vrcwEDKAzvkUI7TIXyVPIaOUhR/mmBFhIO 2wQCQILH4GkzS2/ZtTd4ssbqm2PeYKI1mZlndkYoXTpCpE0LopPtB8vf3A0SC3cSxXuV Q9illogL2oG0nM6BIa1A+sxU/663V2ESyZ2crURbHCwd0RtFDm2xA/ug+V7gIjmLYb6B DaEQ== X-Gm-Message-State: AODbwcDtexihSP2PCjdOBXgKEFwe39BEeVcBJESKwrT+S0QAGpbKpevw u36vDA14EeKbWrJ1 X-Received: by 10.223.139.199 with SMTP id w7mr12613943wra.92.1496072796041; Mon, 29 May 2017 08:46:36 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:35 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/15] mfd: exynos: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:56 +0200 Message-Id: <1496072763-31209-9-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: Kukjin Kim CC: Krzysztof Kozlowski CC: Javier Martinez Canillas CC: linux-arm-kernel@lists.infradead.org CC: linux-samsung-soc@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/mfd/exynos-lpass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index 0bf3aeb..ca829f8 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -138,7 +138,7 @@ static int exynos_lpass_probe(struct platform_device *pdev) pm_runtime_enable(dev); exynos_lpass_enable(lpass); - return of_platform_populate(dev->of_node, NULL, NULL, dev); + return devm_of_platform_populate(dev); } static int exynos_lpass_remove(struct platform_device *pdev) From patchwork Mon May 29 15:45:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100669 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395173qge; Mon, 29 May 2017 08:47:02 -0700 (PDT) X-Received: by 10.99.1.85 with SMTP id 82mr20154922pgb.74.1496072822143; Mon, 29 May 2017 08:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072822; cv=none; d=google.com; s=arc-20160816; b=BpHLvPQdBQHTXXsbk5HnrXyYdBHMEzD2Fc6hOuWppPty/o18xzCszhKsmAv6lB3nPZ w7NMOHu0yeOVlCofkWkscEI/+804VCmIYhH7aOgUN7BGBRH3ZcbiUQjfufK2MkxjmKNg U4e9CpB2LzpctdwmTpXsjb35c1LAxnHlukQ/SGXsbyxwB3HK0Vrg2n9xlOcpECcFPL8p o3ov79f79AUbCZWANRGvLZz4EPRlqceNdY49ESy0hoov7btOWR7LbDndh9GqRBfx9EqB SmjaZX20I2ok+3W7JyLuzwq5gA7AN/ogUQyLQO9AqDzvgWQs8e51JJ7nGrc0KcHCCxhZ iVJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=Sihy87fcOZ5lGueDGJONrSZYaf+3xCKaP1N3dj1v/v4=; b=D5uW8+809C4iZg805G+53n2GFT6L0StJMqw6ZrnmaNnk3ZhBS7eFOvPSLp4Dy0+FS5 kNHw6H/kSwo7dEnabrb2t0iYAeRAXKpbkFOnAQ5IFZDGILt2+NB91kWHqj5Z8iRZqFIP eGVVBkfiNon741y6TQn6pvLEml1IY0MSdjX6XQfYQ45dE8BXsdL6or4p419Oh8fwAibu MTjXAOJ0sD5izEZR+/bvPF2eV3RUWUt/VcGKIODRPKoKwU032Q7W+9je/79Nj+WdKJiy tbMveSRMLG8WGb+Ck0Cr4Af8uNrN19MTJ4pOmUbaHcjGmLnWkIVfk8YRySJMzyBwo4Pl 9ptA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190si9455906pgi.411.2017.05.29.08.47.01; Mon, 29 May 2017 08:47:02 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751405AbdE2Pqw (ORCPT + 25 others); Mon, 29 May 2017 11:46:52 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35397 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751383AbdE2Pqs (ORCPT ); Mon, 29 May 2017 11:46:48 -0400 Received: by mail-wm0-f48.google.com with SMTP id b84so60810180wmh.0 for ; Mon, 29 May 2017 08:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Sihy87fcOZ5lGueDGJONrSZYaf+3xCKaP1N3dj1v/v4=; b=LfDxA+ezgWFIJhZZajYC6UtJW0KJRxcFZF+xuafugjHn2LN6aFh/5Lu3bQ/uhU4mfE wdk2Ds+pw3sSSpT0S8kRj17FVOgsvzCydVJYeFwLXikaRsh+pvGuy/tmBfVUQjrZsqh+ kAxp0L3gmyrR2K+P64MEmiOu16jYnQ+h3Ie6g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Sihy87fcOZ5lGueDGJONrSZYaf+3xCKaP1N3dj1v/v4=; b=hvAkCyhCVHqiZn9WnBavG1OaE6vtRfBZzMwTuyA4Hf4AbiMxL08NLlxPf3cGwdX64k PyNytMYxhCJ+gTwtRqMu1ghGXLBHbKBiQ/dKB5HfjEuYhsCr+XIlIvaJ2nc8+Ew1UFBF 42TCbcDqS/J7qn5kyB84PP93sdXcnLDcOPly0WSv3LwEnipeuEE2uw2M7Vrm1ReZrqH9 VtIefMT1hfiCCd4U6plOy1gNdt58WJQJHo3yuAx6ZC7lAncNbzV7nTujSThQVi96tvyD 4GfeIcst9XBTDZebFVRVt+xHNnwNVJUCuilXjXrNea0r/PQupAiU63vlQRJpZYtNdfuh +nFQ== X-Gm-Message-State: AODbwcBrp/3u9CB2Mhgq9BtcMmcUIM7BlYyfZbsod3ups12ToDYn6UB2 Uw3j6/nJJ6sAfkVc X-Received: by 10.223.181.147 with SMTP id c19mr10262434wre.45.1496072797319; Mon, 29 May 2017 08:46:37 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:36 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 09/15] mfd: fsl-imx25: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:57 +0200 Message-Id: <1496072763-31209-10-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/fsl-imx25-tsadc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 1.9.1 diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c index ac430a3..4258a42 100644 --- a/drivers/mfd/fsl-imx25-tsadc.c +++ b/drivers/mfd/fsl-imx25-tsadc.c @@ -129,7 +129,6 @@ static void mx25_tsadc_setup_clk(struct platform_device *pdev, static int mx25_tsadc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; struct mx25_tsadc *tsadc; struct resource *res; int ret; @@ -178,9 +177,7 @@ static int mx25_tsadc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, tsadc); - of_platform_populate(np, NULL, NULL, dev); - - return 0; + return devm_of_platform_populate(dev); } static const struct of_device_id mx25_tsadc_ids[] = { From patchwork Mon May 29 15:45:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100666 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395080qge; Mon, 29 May 2017 08:46:47 -0700 (PDT) X-Received: by 10.99.139.195 with SMTP id j186mr20105619pge.134.1496072807618; Mon, 29 May 2017 08:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072807; cv=none; d=google.com; s=arc-20160816; b=s7CFap49CFEXctwukPyrbTmGRZJVp79eEa/tE+EqYfViaKbPF6hBwAaqTNKP2alS7E AYAqpl3so0r87N5Gk3m3kN+J6LavXpZUUG457/3GN1BssF9iEnT8NYbfuWPzrojolgjM 8ooIEvk90sZY/LChUVUnoPjAHoKcKmY5bPDTFS9NqnxkqMYp18mQH6xTVPT+kRKTp02U JLUSfM/pGnmP357AAwzDRavSH3603hIM9KXf0dGb0LFsCtxJ2qZ7ZdWEu25MzWf6+AZm 2SEe68Ie8QCy6pXDyKWjKI7NJVl4AwvHCBozh/+UyqHtRpkH14A7CMqG18LZRfxx/2xI Grbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=lAvaXv7mOJzto88MZOIvjf/63HhAZgaKPx38ahvonMo=; b=vfrv+MXknULgMf/Bm0Z0Vz2oGscLR5A7R57aPWbo28yIKxCbFOliP8rn/xYjAEhOV1 vBCnAvuZ0Hkn4DOZI2k4dTOm7f+tR45gWraMnZQYyPMOxDdlmpvQwbjRgc9eG6xv+p7X kTFot4393DYvQuEpXPd+ttVamdDgYh8aFlK/8IHQ8v8ikYTcEylsU8rOu2EbOpwpBycO i5pU83uUC/2RJfWKET1McUsZS31+zqZgKM/+ehARNMJYyUOw6JSvCRhVxWcsbvuEXKFq PC9JG+8Aei4nJEx+hyVc30ZHrjXS0FEOES2UXiy41czt65SOmXPkzQDGs50c/ztymZWs Wiag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o82si10870846pfi.82.2017.05.29.08.46.47; Mon, 29 May 2017 08:46:47 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751333AbdE2Pqm (ORCPT + 25 others); Mon, 29 May 2017 11:46:42 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37181 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbdE2Pqj (ORCPT ); Mon, 29 May 2017 11:46:39 -0400 Received: by mail-wm0-f52.google.com with SMTP id d127so64532824wmf.0 for ; Mon, 29 May 2017 08:46:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lAvaXv7mOJzto88MZOIvjf/63HhAZgaKPx38ahvonMo=; b=jY9BPHasff+zAuoLJH0AxjGjgLctPMA5AbMSo9N9JFnDyB1cHc5JuKj1mG44sKAJgN TYFucAQ0iTfZHtzB1OrvBqEvLfgSGUf2kvZsACaHOlIme6A2Ay7emQ1RloMat9irQZUR xPp8vu01wPIxx5MSEa+JNHTdqbIaBw8JxAX64= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lAvaXv7mOJzto88MZOIvjf/63HhAZgaKPx38ahvonMo=; b=f6gQHFezNt3y3hm9LPMKyFRn/JH4tt8XZ/aV+a034ahIebnDQp5Ia3FH4jHHyptGIx A68ehSO0hW4fkVD5Si+oRZGmXIaU0hhiCULKOFPCHXcDc9nw3bqZOUfSwnqXfjouELF8 JIw9JHuM7Wwe0hBV801yHNkKBvj9T7VKFmYAfLORiAr//12nr37k7K/JNVf05WDssV+5 /2daB2FHIhnsRpKy6k0XXt5iKOuGIgbPb6UC84FtxpiU/e62KmzgaFmbZMw3Aqvmv5bQ zWeFydiwvOlZ7IgnArm3Tuqdumw8nHqAjWbWEOLEf8goMkHykm91YIBKQ8GxIdayzY77 U4/g== X-Gm-Message-State: AODbwcA2DRD+4mYwijX6jYD32Vjn6CwzargvySMeCxmvCYklViohy6MG PKi6pFFlmIzFPBOcg8rUzj97 X-Received: by 10.28.0.13 with SMTP id 13mr10446219wma.19.1496072798437; Mon, 29 May 2017 08:46:38 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:38 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 10/15] mfd: motorola-cpcap: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:58 +0200 Message-Id: <1496072763-31209-11-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Usage of devm_of_platform_populate() simplify driver code by allowing to delete cpcap_remove(). Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/motorola-cpcap.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- 1.9.1 diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c index 3cab58a..d2cc1ea 100644 --- a/drivers/mfd/motorola-cpcap.c +++ b/drivers/mfd/motorola-cpcap.c @@ -260,17 +260,7 @@ static int cpcap_probe(struct spi_device *spi) if (ret) return ret; - return of_platform_populate(spi->dev.of_node, NULL, NULL, - &cpcap->spi->dev); -} - -static int cpcap_remove(struct spi_device *pdev) -{ - struct cpcap_ddata *cpcap = spi_get_drvdata(pdev); - - of_platform_depopulate(&cpcap->spi->dev); - - return 0; + return devm_of_platform_populate(&cpcap->spi->dev); } static struct spi_driver cpcap_driver = { @@ -279,7 +269,6 @@ static int cpcap_remove(struct spi_device *pdev) .of_match_table = cpcap_of_match, }, .probe = cpcap_probe, - .remove = cpcap_remove, }; module_spi_driver(cpcap_driver); From patchwork Mon May 29 15:45:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100671 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395220qge; Mon, 29 May 2017 08:47:10 -0700 (PDT) X-Received: by 10.98.252.8 with SMTP id e8mr18841857pfh.190.1496072830488; Mon, 29 May 2017 08:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072830; cv=none; d=google.com; s=arc-20160816; b=VFhL7ytvQ+aX8wWPx0LQybdDey9ltAuQnN2KyP0iuZ6BCSSsDHlRphj/28jrbdvNTj 79kculygyPbJ5CmH10LIW0u/DoFZTJDKH0CjAJntFr95ekht7Q6ea4MRET9YHExT7Y0M 5/JRKKXaB4ABlW3L3b/OlULX6b+gJ7/4qAPTz1GQ39JDvDgCuCZMd4cGJo7jsmCtxlDk VNjhQlwirn1vOjRQ/0bsu2GRXif8Pnvnen9F/imsyhwhiz+b+J3pUzTTXF99oaiZo6hU DsbpA7FzTNgAvIPNW+Obg5OZY2uykdditi/d7gjQyaQtq+aF9SjHcsfO8AqduyMiQeTd Da2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=ic5GYsgjRuYfWrGYocGqjkgVHzL538b2u/UM9ilYLgM=; b=akozGKwnG1sdawVzuwvpAgsWs4NO34pFTOQRA0DORbZyzAhr20nsQHjcg5YiVNgeO1 CmgDEcaPWhZk6UGaRg/f+ubmqyoT0aThuZXbJLqwlFm9t0VtcapDmnQNPnXkRwDfSEUo KMtrnC67X4TSrpuFHDrdYlrjo5XkGkqqJybKsD0LYC3NkrVs5b+Cd7cqxeBSY9CKhXde ekJbaDN4DYjxla+vugHkDFskLR+HKF2MIkYLEQWPjiLQ5I14W3QPjQaJPjCvuOqrsT9v ksGg3NysUIBaHocbv+jzxmS346PgJ9vKYioxGh/CgLtuI/p2k6GbWhPBkMXim9sNvGiF qG4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x66si10669909pgb.146.2017.05.29.08.47.10; Mon, 29 May 2017 08:47:10 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751444AbdE2PrC (ORCPT + 25 others); Mon, 29 May 2017 11:47:02 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36304 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbdE2Pq4 (ORCPT ); Mon, 29 May 2017 11:46:56 -0400 Received: by mail-wm0-f46.google.com with SMTP id 7so60661798wmo.1 for ; Mon, 29 May 2017 08:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ic5GYsgjRuYfWrGYocGqjkgVHzL538b2u/UM9ilYLgM=; b=SHno9MpbpyHpXeOh9nv2FfyI3yiJoWc/H1KyU2LyG7ZSNZfyZzaGZuZ1IeWLvkuVKL 7T68wHZY7MOIhgLUFrYNygRFvsGyiGOUwpfxOvqQLvHA4FLoggKKkAreQNS3+lzMCJK5 okmYT4OVKSPT4qtNvqkjvB5+ew9ITrHpdf9/M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ic5GYsgjRuYfWrGYocGqjkgVHzL538b2u/UM9ilYLgM=; b=NsU6GdtZFGpDqsmk7elQ7TpNjaELJHIt+T1+b6VS/uIJ/AwT3gpv5yi2YwVxrMr5rJ ypOAH2KJ9Coc2o1OspnZYWsxM3LMPRPf846DqgLEWxGbYcw7nD3Q7kffOBpVkagLm81S qbkHxDW1uCRBKCJhZJSuPYGsgYoBmw3ZAisIQovsuIX6MLwb8JFZ+oL4RoTYArYktSf/ iz38nNwk+nbjbPVTgH+v0KPcMOj7GSO+4gaXL3/zg/RePnd6JPppQ2uedm8ie2LNeGer z74yFOGhEWXMHn4CbS3VeIr2t1o+Dtc83ku6PZcXgU7ErSsYaZGBOAiZL93/aYtms+6r xXDw== X-Gm-Message-State: AODbwcDBx4JjuoeoH/nK0ORkLNLzj94WqLY5MOl7VnjWmCPpCQf8Efj8 VFtV4oOkXsQ8U3a+ X-Received: by 10.28.54.91 with SMTP id d88mr10320688wma.9.1496072799762; Mon, 29 May 2017 08:46:39 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:39 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Tony Lindgren , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 11/15] mfd: palmas: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:59 +0200 Message-Id: <1496072763-31209-12-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard CC: Tony Lindgren CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/palmas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c index 9103aff..3922a93 100644 --- a/drivers/mfd/palmas.c +++ b/drivers/mfd/palmas.c @@ -676,7 +676,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c, * otherwise continue and add devices using mfd helpers. */ if (node) { - ret = of_platform_populate(node, NULL, NULL, &i2c->dev); + ret = devm_of_platform_populate(&i2c->dev); if (ret < 0) { goto err_irq; } else if (pdata->pm_off && !pm_power_off) { From patchwork Mon May 29 15:46:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100667 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395166qge; Mon, 29 May 2017 08:47:01 -0700 (PDT) X-Received: by 10.98.113.72 with SMTP id m69mr18698557pfc.195.1496072821252; Mon, 29 May 2017 08:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072821; cv=none; d=google.com; s=arc-20160816; b=qBTuHsinreYsxikJ8jTGX+loxCxXmN9GiGIyYnEWPC1OqgsjxAiSP4fB1Uq0tpTiWt ix143BQIexCGgcmlFJGB4JfOkTwfGjQ2rjC4gI5mHzvbwvFRKeEBCKb2BZ6EqUPoWGH0 qxewr701cQzRT3yFUaVWIJGGF95BAvk3Rbi9feG4AuHXRGKxIT6JPQO0A4sCKwQ93ypz t3s4ZpPq7/3WegBgttRNr8G7MQoEcq+9c2dPFScpwSftnMRf0zGNm39SnVqJY+xEtP/1 G6FVQNdz/NZo0ucK4fEYu6u+UYdJTF5/Fy/biZnM7AwBe5TYwCGxLByxoMW4fxdGmrml vALA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=D1v0xT4Arloy/+74iwVUGMwRLi5gKXPq0wCut4i6YFo=; b=NUPRbIJpnsOIVeEtMDIXkIIWdt9rv5mXAOFEwg+/v9eIMmo0Ux6dgcsIW371Y5japC V8EeEQFzTgMfB6TZ1U4oqEsi2th4c8CaE7mHJULVXVvD5MIkw2seU1z+LZcytwCHoFFp WoYLwhsjIvN0/CtZyBVH0peaN9iyxPf6QeEBbiNVERXRyesjUH5Fp+kB8MWNplvTqcTY t285Y1F8QKOmAG1miYD121y0wKO4M1S1gXbEfILV7ibxKDrHItSF8SJ/M5gy5FRB71rf 18X6yI8/UYWa0BKbCyC1nFAu7AqyKgjiujpqudfSIII1vyxuUgmBiJhPBmuofQPn/Ibu g3yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190si9455906pgi.411.2017.05.29.08.47.00; Mon, 29 May 2017 08:47:01 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356AbdE2Pqp (ORCPT + 25 others); Mon, 29 May 2017 11:46:45 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:38650 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751313AbdE2Pqm (ORCPT ); Mon, 29 May 2017 11:46:42 -0400 Received: by mail-wm0-f50.google.com with SMTP id e127so65985051wmg.1 for ; Mon, 29 May 2017 08:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=D1v0xT4Arloy/+74iwVUGMwRLi5gKXPq0wCut4i6YFo=; b=Sk+HFH9uB/OcqjpycWGiHk1cps6HW0XwGL38JgmDzUaI8ox5/h3xhXEdY/A4UikiaX 6nrYqNZXjSxpYHKRVtMrBiz/+ohMdtLY63Y2gTBVHU2hlw5BBWhDP/2LQz3Hz1RHS0vL EdJKGtpvZjkKun97odXbM7KM2qSHZt6gVQtfI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=D1v0xT4Arloy/+74iwVUGMwRLi5gKXPq0wCut4i6YFo=; b=htR9e22Nav1zCDLYjmjHl+7zpYQjfimeqI4eRlgMUg5br/abaScy+HPdaLpXKNDZRj R86jjFPfZWlMvZ4ZiQ1vYTqYQz1l6jT4HTxc4BRMd9MDVkCOgcn4XOc9jB+fkToK8Z/q enOQtyDjJdlrhSyjWd8IYS2Ok5T3FVIbe2tZ1u8uwFoHmKRLyAyQtrIM0A8sWuIFDseN 3i4A1ZlaIOxsAFCyyGDmAXaFwc3kkJmWWLTyWtRcCu1Ab5gNbsx1FaK0X0RIlHAE/MP8 MR1/Bx6HewMQ9QXbjXbueSM0dFJyHlUBIyZbIMbWy/pdIf4t1NHmA8QVdOsHOFoY2vsd jQWg== X-Gm-Message-State: AODbwcDgChlpGGBpHVaENYVtlrCs7JaBT/coJ2y17SIhUg1hZ7RuTork B5u1cvl2uUxqzz3+Ep16SG/W X-Received: by 10.28.173.85 with SMTP id w82mr20912373wme.98.1496072800908; Mon, 29 May 2017 08:46:40 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:40 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 12/15] mfd: qcom-spmi-pmic: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:46:00 +0200 Message-Id: <1496072763-31209-13-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Usage of devm_of_platform_populate() simplify driver code by allowing to delete pmic_spmi_remove(). Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/qcom-spmi-pmic.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 1.9.1 diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c index 8653e8b..2022bdf 100644 --- a/drivers/mfd/qcom-spmi-pmic.c +++ b/drivers/mfd/qcom-spmi-pmic.c @@ -120,7 +120,6 @@ static void pmic_spmi_show_revid(struct regmap *map, struct device *dev) static int pmic_spmi_probe(struct spmi_device *sdev) { - struct device_node *root = sdev->dev.of_node; struct regmap *regmap; regmap = devm_regmap_init_spmi_ext(sdev, &spmi_regmap_config); @@ -131,19 +130,13 @@ static int pmic_spmi_probe(struct spmi_device *sdev) if (sdev->usid % 2 == 0) pmic_spmi_show_revid(regmap, &sdev->dev); - return of_platform_populate(root, NULL, NULL, &sdev->dev); -} - -static void pmic_spmi_remove(struct spmi_device *sdev) -{ - of_platform_depopulate(&sdev->dev); + return devm_of_platform_populate(&sdev->dev); } MODULE_DEVICE_TABLE(of, pmic_spmi_id_table); static struct spmi_driver pmic_spmi_driver = { .probe = pmic_spmi_probe, - .remove = pmic_spmi_remove, .driver = { .name = "pmic-spmi", .of_match_table = pmic_spmi_id_table, From patchwork Mon May 29 15:46:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100673 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395660qge; Mon, 29 May 2017 08:48:29 -0700 (PDT) X-Received: by 10.98.214.200 with SMTP id a69mr18864878pfl.40.1496072909204; Mon, 29 May 2017 08:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072909; cv=none; d=google.com; s=arc-20160816; b=HbxdDBvKFfKXcFJmgdqu2KChEDum3ZLF6y53Wr0kQG8vsyJ85C1tS7z5i11pdjLYSk sJ9lsXBBRH8U4w8EGz6xV5K8yRFYEyKdJAKX1Tb0On0A3m+1xPpoQ1N8cc4xQUdaiOyu v8keVir11X60TDmkvWt3eNm0ryKvmpGb7KiZRcVShDUEWP2iBj0XRNkp0ueNEq9XPAaF zeTvjUS2PyA+OxjCP89t+mOMfQzG9sYltzRzYEGhqtkMrQ5K7E0Cmu8gzEGPu87fZakn R7uElQMU6DSi+fmMrP+luTG7uH8VxnoOYMOl4kbbTcnPyJ9axY8Kh2QtvEJzqiA2JpeC CVnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=4sAH2iSr+Glb+byPfklZ98WzawmFj6b3YwH9SMylm+w=; b=c9f03jDPccYj186hzr9ezKRutqCVFqgSwwVRpdjf92XbearS+R4KrC+OeSo/YqB5CX IONNEXWRU7RHXwiYzsou8kaB7UYdOvrhrfZmbDBQ3UVj0IwnxLg6OVDAHKPV7W5EOFzu IOip50+4AAnzydfH02FKhejNLnCbF/ZdOfyYu35vj85by5Cg6H3Y1E/MUcCG+D4a34lB 5vHhl9EnOY3iCMxjynVNIFVEvdxiC0C8Pfq7sj0CQW+GFydThIyIA+eR+lOcfK1AyTpV gvoVXTFSaOIHdVU8tdG3R+H1VyCJqCrLMJ0zUoQN/UjuHhGaOwVPPzqE/U3hl3wYXURx /CrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u140si10322095pgb.25.2017.05.29.08.48.28; Mon, 29 May 2017 08:48:29 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751460AbdE2PsB (ORCPT + 25 others); Mon, 29 May 2017 11:48:01 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35492 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbdE2Pqn (ORCPT ); Mon, 29 May 2017 11:46:43 -0400 Received: by mail-wm0-f54.google.com with SMTP id b84so60812376wmh.0 for ; Mon, 29 May 2017 08:46:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4sAH2iSr+Glb+byPfklZ98WzawmFj6b3YwH9SMylm+w=; b=GAF1ReanlOSOqaiH49jxHnxsTzzy0XZHXR3TB24gjzyybzxBDFoGWn1Fndfyjykfg7 JSH10p9RmCJsUrCp2+JMw/LcauPKWSp/GUR0vQw60AXwdaP5Y9sMGkwc6XsedLRnD08E rHyPpqUqGsIx0XRR9kEGJdD6Djs2lW1Ih0aRQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4sAH2iSr+Glb+byPfklZ98WzawmFj6b3YwH9SMylm+w=; b=opvGuFO3PiGIxLqOI+nLXxTv0be6K+W/B5K5ZWffkSfHrKPyRpbSF3lF4+JU4Js4AO qdrsq6bVwhC2LoQiDrpIw8UGs1+tufRXHuh5rqVqJ+vBpDCUIS5PejnXGNLeT1ezeoSu r1e6xUlYkq5d/8JdXJWFCoUWUaLTXIRJ/YouOBMACzq22ERZtWavbLh+m2YjzD925Xmj UfaumMBFQLD+wpGDtJ6JyKPKsl5nkqdIhuKEnAOZWm63OgOW9HDPUDXrwaACvPGtafxK uxCVSpDoLTNk3JZFCsnr4Wbw1rxReF4McUpOs/IbUPzsnsZ2w/5gsnmnDV9xfsTOfFNW o86g== X-Gm-Message-State: AODbwcCEPT6toQhQe3lv75akGokdKSLsu8/7jKrxDg/7L3YhGYILJ+9W ZYv1n6fc4tnG93GN X-Received: by 10.223.129.229 with SMTP id 92mr11270432wra.57.1496072802033; Mon, 29 May 2017 08:46:42 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:41 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 13/15] mfd: smsc-ece: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:46:01 +0200 Message-Id: <1496072763-31209-14-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/smsc-ece1099.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.9.1 diff --git a/drivers/mfd/smsc-ece1099.c b/drivers/mfd/smsc-ece1099.c index 1f40baf..93a8297 100644 --- a/drivers/mfd/smsc-ece1099.c +++ b/drivers/mfd/smsc-ece1099.c @@ -69,8 +69,7 @@ static int smsc_i2c_probe(struct i2c_client *i2c, #ifdef CONFIG_OF if (i2c->dev.of_node) - ret = of_platform_populate(i2c->dev.of_node, - NULL, NULL, &i2c->dev); + ret = devm_of_platform_populate(&i2c->dev); #endif return ret; From patchwork Mon May 29 15:46:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100668 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395170qge; Mon, 29 May 2017 08:47:01 -0700 (PDT) X-Received: by 10.99.109.141 with SMTP id i135mr19894828pgc.33.1496072821783; Mon, 29 May 2017 08:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072821; cv=none; d=google.com; s=arc-20160816; b=mwOmJVGDfrpDsMSaxZ3a1G5wLgnHXCMbjAWYlR8HzsQ5zNFgFaVAZ4YvRcwRPH1rVX sLmwMVysmqBFAu6eBO1svWYIc88kC6qdzeQ0ezr2kkUiZfTJAm3mC9WxD3XIx9WoqlP6 FHt+E440CpwvANkJOos7StTEmD8RgPizCd7NmI/sYURPilXVgh0jrg/tF2nwKNAs6IxS zBsgs4fgMUVIg/Onz8x87kGavVikbWtKaAALJL6PD5/6w0lc8e0N559Fw2uX/vxZdepN gb1xFPnKkj45JuWVedeXWx1PLfiSxV7SdrtwkI6WPp0JlnryHJE9Nkuc1GDyGWTstl7O 76SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=Oe71OZ/fwGF7WxwsSHjCUWY8lrszx0uJdhcBhtrdjHg=; b=Nzgqf66D9hR78IjY2WYBvwb+07aBPDgjNYLaOMB3CXOYaGpAWLUZLMc+72+2jiKY5C /ix738nfwK4vu+OYBp3t0Nt53PCFSwJzooXK0lZpN9OAqbKC4uRa0e3poXEwWzsFZBfj 3xvlC1CwZG2vW0vi9Ra9RefPfie7KrCa/Tz15bfAElA4sazfzTQc6nndN3mAY5fS2hXO Y8Stuzue6DiO/M2uhkhRe1muKl+UzLKsqLO5KTtCyZBk1F0LBfNvqCK4l6FX/roO/u+4 LOdnUPe7ayUBtYexhkz55ayUMP5D00xv2bEB7iuP3JtmknGR86ygSX//yW1wmOJMw0sR ojhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190si9455906pgi.411.2017.05.29.08.47.01; Mon, 29 May 2017 08:47:01 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751381AbdE2Pqs (ORCPT + 25 others); Mon, 29 May 2017 11:46:48 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37331 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751350AbdE2Pqp (ORCPT ); Mon, 29 May 2017 11:46:45 -0400 Received: by mail-wm0-f43.google.com with SMTP id d127so64535788wmf.0 for ; Mon, 29 May 2017 08:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Oe71OZ/fwGF7WxwsSHjCUWY8lrszx0uJdhcBhtrdjHg=; b=irqndlKGW0hhdoTXyJkBcrwzXJyG1oADSqydjyCdy5PT3jHVj782B44Uq+LAb4cVPz ycMqLNmWeZ9EylENAnwnUBNTDXBFGEfRB/JGebJTlHqvIj5qw1FyoC05YqdmIEeRVP3/ Nnq4IveFpT7CS/MQuPjyBSJQC+k4iuZZn7FBc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Oe71OZ/fwGF7WxwsSHjCUWY8lrszx0uJdhcBhtrdjHg=; b=QyigNGdB0HXnEde5EApMKOl12XoWFLuBXx0IrkUJzZo2Fy1UdVDiPo5eZEBdGElmD8 bR/tcif16GMFOyTq+lRXbVzyoGWPtCmHxR9xFz/mrEB/1XLNCIpfqzHVa1PvYNPf/hEX pouw4Ey/UVMq8zNjvucH+vIFEryvhBKzfVOJA1goctHkNGutsqXACbSORpxdIglDs7FO x6U6qMXEcG/w2i97JdsX/FHACIFfeQX4iTHzOzNz0P3Pf505uJVBG/tE+BWhcF/uKWHR eYdtXMFIC7i2ACqzDUJjDx4MJmfkxB4ILomvf8v65RESCQZr85F7xibKP3X0DqD0POcN XVog== X-Gm-Message-State: AODbwcAmjDlMOAtewpM49nJ2TdOLCRBwkTJZBHPygBRIXTTEITPxDPoC uVrcduLL75uOiqE1 X-Received: by 10.28.49.198 with SMTP id x189mr23711428wmx.93.1496072803868; Mon, 29 May 2017 08:46:43 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:43 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Alexandre Torgue , Olivier Moysan , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/15] sound: stm32: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:46:02 +0200 Message-Id: <1496072763-31209-15-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Usage of devm_of_platform_populate() simplify driver code by allowing to delete stm32_sai_remove(). Signed-off-by: Benjamin Gaignard CC: Liam Girdwood CC: Mark Brown CC: Jaroslav Kysela CC: Takashi Iwai CC: Alexandre Torgue CC: Olivier Moysan CC: alsa-devel@alsa-project.org CC: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org --- sound/soc/stm/stm32_sai.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) -- 1.9.1 Acked-by: Olivier Moysan diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c index 2a27a26..25304f8 100644 --- a/sound/soc/stm/stm32_sai.c +++ b/sound/soc/stm/stm32_sai.c @@ -34,7 +34,6 @@ static int stm32_sai_probe(struct platform_device *pdev) { - struct device_node *np = pdev->dev.of_node; struct stm32_sai_data *sai; struct reset_control *rst; struct resource *res; @@ -86,14 +85,7 @@ static int stm32_sai_probe(struct platform_device *pdev) sai->pdev = pdev; platform_set_drvdata(pdev, sai); - return of_platform_populate(np, NULL, NULL, &pdev->dev); -} - -static int stm32_sai_remove(struct platform_device *pdev) -{ - of_platform_depopulate(&pdev->dev); - - return 0; + return devm_of_platform_populate(&pdev->dev); } MODULE_DEVICE_TABLE(of, stm32_sai_ids); @@ -104,7 +96,6 @@ static int stm32_sai_remove(struct platform_device *pdev) .of_match_table = stm32_sai_ids, }, .probe = stm32_sai_probe, - .remove = stm32_sai_remove, }; module_platform_driver(stm32_sai_driver); From patchwork Mon May 29 15:46:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100670 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395176qge; Mon, 29 May 2017 08:47:02 -0700 (PDT) X-Received: by 10.98.75.157 with SMTP id d29mr18507405pfj.135.1496072822516; Mon, 29 May 2017 08:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072822; cv=none; d=google.com; s=arc-20160816; b=GbfLeglWOf0apLfh046Qg30CSzGEUmq0awo+ur7/t1FeX3V1vOCIKDON18Fif7hkJS D3ZzUoRA4tdhZ/xOgsqX+PW4ZvGm+lmJcLxQ3z3jAL4beEtoYESlqE7m67gmRQGnwCLQ bQuofe/CC6v3ayJF2/pF74Ib7d8FKEkXW/qeAe5SLlhfXJIUpvo2HheBFkE1c8TYQII5 MDKkR4v6sbFC8iwWnK/Ko3hiVnuMRr2nESr+XvHsViyqhKtZHgS3g97UHzLdGxx8ubJ1 GHfsuyumoETYA8FHMKqLS7+GGVPj/qi6cOKgpmiJCS/cp1V7OGQSSjffmErtRAQtX/sz PNxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=twWxZ9n1pyjxLWPmioPBGc7AQNKEycwVRj+KJGxyZ+4=; b=gG+ntGn+uTDaMN8RM5TZZ7NzTpcMudDyonC8TWtCxb3CzHjCL3OFBWtO2Pyl73Gs+X 60V7Ucl4aqwjk5RIWk8R/lv3ORZGTbNMRHvzuyMcXG0SgdFmZTrdcX/vawQAka1aoEa8 pOW29bENMYwklzGarbktdiGYXxqzZBVUdKqPYBvTokV0dobBYPWS5ieHBzfW5KBq+nZg FABJo3iagjYhP9YyfPk8dMKbwe9ZQzw5vvlW4j5ThEhN61JZ0ZkaR673f/VPrFHSpjl8 ghyZA/GlD0HgHYCTBt8HvC6xKBum4jaGIrBTaDQoQwP692JYPBPrdp2hWTX01ys0SWk4 QY8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190si9455906pgi.411.2017.05.29.08.47.02; Mon, 29 May 2017 08:47:02 -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=fail header.i=@linaro.org; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426AbdE2Pq4 (ORCPT + 25 others); Mon, 29 May 2017 11:46:56 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35570 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387AbdE2Pqw (ORCPT ); Mon, 29 May 2017 11:46:52 -0400 Received: by mail-wm0-f52.google.com with SMTP id b84so60814281wmh.0 for ; Mon, 29 May 2017 08:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=twWxZ9n1pyjxLWPmioPBGc7AQNKEycwVRj+KJGxyZ+4=; b=heaGf2OiI1lPDmnqC54tmeEDo5PuTyaqZNSzOJsyJ+hBADOpD+/Rie38grungW7z3d kdu7fbb7CHOhHcJMGDBBDSYfsEdY/KfbQvKB/HvPaCwP9PDJR/cRoMxARLLYDH/fscaD jYdGXCs42NEbnHQWVXcMMgg3VE2W0CKMsTzXY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=twWxZ9n1pyjxLWPmioPBGc7AQNKEycwVRj+KJGxyZ+4=; b=JI9LWifMH32Y277JrqBvNVCKJeNnR0Mic5pk+o4ZTjnMxswhbVC1btMlwfoUsl9+ZQ 9UZiGBsPDy3fcHCw0Xh/TFCYNn6uOW2GvzugdJPmdnEafB6I71fovgFwH9iE3vJmtTtu QIvNggMWlP4I4pfQPfOXnOJJ5sN90sousEm295/MMwBBvEUkdLUDSz4xJEqpVWumqCjW i+2bdseTJke2f81eos0hDmC3t/jY2x4eFqNlkS1qDQIS7pVJXJQ59O5QvXk5zdEPBnV1 BGZenxrz9HhSBS4OrrM/egl8ePIqONcuOld9weTKV68EOJlKrlOz4UQJP//IKK8YpoKZ 3jkA== X-Gm-Message-State: AODbwcA9DIFjLjy5LwVpFPrQWagLQtMUn0y67jIEXdk7jwbQzHilun9F qwQLAOIKyXVOdrMc X-Received: by 10.223.134.238 with SMTP id 43mr10776652wry.80.1496072805697; Mon, 29 May 2017 08:46:45 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:45 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Kyungmin Park , Sylwester Nawrocki , Mauro Carvalho Chehab , Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/15] media: exynos4-is: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:46:03 +0200 Message-Id: <1496072763-31209-16-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Usage of devm_of_platform_populate() simplify driver code and save somes lines Signed-off-by: Benjamin Gaignard CC: Kyungmin Park CC: Sylwester Nawrocki CC: Mauro Carvalho Chehab CC: Kukjin Kim CC: Krzysztof Kozlowski CC: Javier Martinez Canillas CC: linux-media@vger.kernel.org CC: linux-arm-kernel@lists.infradead.org CC: linux-samsung-soc@vger.kernel.org CC: linux-kernel@vger.kernel.org --- drivers/media/platform/exynos4-is/fimc-is.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 1.9.1 diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c index 7f92144..340d906 100644 --- a/drivers/media/platform/exynos4-is/fimc-is.c +++ b/drivers/media/platform/exynos4-is/fimc-is.c @@ -854,7 +854,7 @@ static int fimc_is_probe(struct platform_device *pdev) vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32)); - ret = of_platform_populate(dev->of_node, NULL, NULL, dev); + ret = devm_of_platform_populate(dev); if (ret < 0) goto err_pm; @@ -864,7 +864,7 @@ static int fimc_is_probe(struct platform_device *pdev) */ ret = fimc_is_register_subdevs(is); if (ret < 0) - goto err_of_dep; + goto err_pm; ret = fimc_is_debugfs_create(is); if (ret < 0) @@ -883,8 +883,6 @@ static int fimc_is_probe(struct platform_device *pdev) fimc_is_debugfs_remove(is); err_sd: fimc_is_unregister_subdevs(is); -err_of_dep: - of_platform_depopulate(dev); err_pm: if (!pm_runtime_enabled(dev)) fimc_is_runtime_suspend(dev); @@ -946,7 +944,6 @@ static int fimc_is_remove(struct platform_device *pdev) if (!pm_runtime_status_suspended(dev)) fimc_is_runtime_suspend(dev); free_irq(is->irq, is); - of_platform_depopulate(dev); fimc_is_unregister_subdevs(is); vb2_dma_contig_clear_max_seg_size(dev); fimc_is_put_clocks(is);