Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1083017pxb; Tue, 17 Aug 2021 03:28:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4XQkVf7vgGPREj4hNHcGCMFm33xFopdMX7+dnjYiGTf1gfbtnyN+DhDtLpNbXuO3J3ld1 X-Received: by 2002:a02:b091:: with SMTP id v17mr2344624jah.33.1629196099345; Tue, 17 Aug 2021 03:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629196099; cv=none; d=google.com; s=arc-20160816; b=jqFMSK08GWmWJBHY1ITu7gb7U1+HD+m1dTbUFkJJx01ablVIEOCVVBOsxox7AotZ2e UhkcdMiaE/RUnAq8ML0eCdm+ekfEuOXWalk5x+YY9HEhjZHDm4IDHtFQTclj90pEFL6+ FHtWgxL03V+a09prIic6c7YevEU6yYPMMsn5NvDQAIGnalqs76GrZPr2pNrKLnHCXbty z95q6oGc1BrrTkQM+Mt+bL8gU9sHZUngCEJyYwr3lgKOFXODZk1thDa3PaIIGQI0sz4W /AFlM1zMVxYgOLbYWSKd1OPW6Q+1yzvhi9Chg2nURMlVG8jSwXfGcYa3IRIu5eaUOLlZ o06w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kjSe6RPk1IFYSnbJkTzLN7uCynJ4C9/+CUOQem3zG4o=; b=c21Q8Qr4pxYY0Mi5JKR7vdjPFntRHxsv2Ra8PaLmsE3CV7JrGlrLtjTzbPYlQ7Ubfo 5IVongXdCAvKxybp7jQqpsVPc9sikzhxHVE7gczRhY+hjL/edIKdKo6EQSCuGMEELWh9 6bJyV3FByF2o9cmpTfB/A5/3dKjNOKcZOj3L6QKE8vWUYrVdJ2THO5+4UZO7iMuXvyrg Tsi7p2bcW7Myt4EBjOHgN7JRfikblBmPM1WHi6EaBLpwLCNkpyEDu008ZPya/IR91STh Qt1vdRo+AJeTol5PSlV38bijSa7RkgMHvTmu++LPtF71Kc2Bz4PqA8xLsCDI19sp9e25 QI4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si2307302jal.44.2021.08.17.03.28.08; Tue, 17 Aug 2021 03:28:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239660AbhHQKZd (ORCPT + 99 others); Tue, 17 Aug 2021 06:25:33 -0400 Received: from mga12.intel.com ([192.55.52.136]:56026 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239342AbhHQKZ2 (ORCPT ); Tue, 17 Aug 2021 06:25:28 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10078"; a="195621140" X-IronPort-AV: E=Sophos;i="5.84,328,1620716400"; d="scan'208";a="195621140" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2021 03:24:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,328,1620716400"; d="scan'208";a="593304576" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 17 Aug 2021 03:24:53 -0700 From: Heikki Krogerus To: Greg Kroah-Hartman Cc: Andy Shevchenko , Thierry Reding , Jonathan Hunter , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Subject: [PATCH RESEND 2/2] driver core: platform: Remove platform_device_add_properties() Date: Tue, 17 Aug 2021 13:24:49 +0300 Message-Id: <20210817102449.39994-3-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210817102449.39994-1-heikki.krogerus@linux.intel.com> References: <20210817102449.39994-1-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are no more users for it. The last place where it's called is in platform_device_register_full(). Replacing that call with device_create_managed_software_node() and removing the function. Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus --- drivers/base/platform.c | 20 ++------------------ include/linux/platform_device.h | 2 -- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index a94b7f4548814..652531f67135a 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -641,22 +641,6 @@ int platform_device_add_data(struct platform_device *pdev, const void *data, } EXPORT_SYMBOL_GPL(platform_device_add_data); -/** - * platform_device_add_properties - add built-in properties to a platform device - * @pdev: platform device to add properties to - * @properties: null terminated array of properties to add - * - * The function will take deep copy of @properties and attach the copy to the - * platform device. The memory associated with properties will be freed when the - * platform device is released. - */ -int platform_device_add_properties(struct platform_device *pdev, - const struct property_entry *properties) -{ - return device_add_properties(&pdev->dev, properties); -} -EXPORT_SYMBOL_GPL(platform_device_add_properties); - /** * platform_device_add - add a platform device to device hierarchy * @pdev: platform device we're adding @@ -842,8 +826,8 @@ struct platform_device *platform_device_register_full( goto err; if (pdevinfo->properties) { - ret = platform_device_add_properties(pdev, - pdevinfo->properties); + ret = device_create_managed_software_node(&pdev->dev, + pdevinfo->properties, NULL); if (ret) goto err; } diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index ed42ea9f60ba0..7c96f169d2740 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -197,8 +197,6 @@ extern int platform_device_add_resources(struct platform_device *pdev, unsigned int num); extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); -extern int platform_device_add_properties(struct platform_device *pdev, - const struct property_entry *properties); extern int platform_device_add(struct platform_device *pdev); extern void platform_device_del(struct platform_device *pdev); extern void platform_device_put(struct platform_device *pdev); -- 2.30.2