Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1408822lqa; Mon, 29 Apr 2024 07:46:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPkatyDyDQIkbuoa8+5LA2thAwH/wqHxz3J1Pm0NN7nxgZjPKX8iqwncHy9WFV5p/gWwn3ed6HyRZaC0ShYwd3Jzlxyk4OCmAqRpy47A== X-Google-Smtp-Source: AGHT+IFo1R/EUmklKE5EQ7LOtCqajbbIKcaV3eamGnsRsohVx6VJIVrQZuuimZZ94bKsKwSJZFck X-Received: by 2002:a17:902:bb83:b0:1de:fbc8:53af with SMTP id m3-20020a170902bb8300b001defbc853afmr6785731pls.25.1714401971426; Mon, 29 Apr 2024 07:46:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714401971; cv=pass; d=google.com; s=arc-20160816; b=GfouBUnZM8dATvgTkkjzZsI9+pXRGJAtE++Mm/yufAD7xBVGy8MAibTWzH77DqPL1o sA5dP8KPqKOC1cVLy6Humo9yS2BAkhJOs5X+wvSLtx9cDApA35UzGmjVjtYUy54b4O/b nCQMwbfg51oB8ptcOv1VDk+DJRKmYfHE/DVjj2wOd+2s4EFftTD/oeK+stD53TwmdZ9j 6ic7kp05q9wzSgr4Vn3OhKHNqmXy9ItKhXSY+pPlt42D5nWyLPNfzweITzzyhfn8Az3s fhgXNv+oP0qTGntWYu0KpWTG1QAIXsmYcVqxa0WRVqZGBOIcv5hQrQWdVBZUe8usKw8R jTag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:dkim-signature; bh=GegKV5EkuBCHQQCPu1Po1ZCGzDgaLOnnPm2lBfg53tI=; fh=9+JPiKUqmiwg7nrgynbn+qu8x0UhUJwyp0gAHVwwYQs=; b=A5Iy4iPYV8Pw1jTALab9WilaYs81OI7QV0k2UGir43eJGwC00+bm99tVAG3T/7z6TY mjykUilH/TqUg8hvGzXijTgNQNu5L9na8iTbkgeSBqdGrUIHM76b0Ne4xvYw7t7RkQuM 5Ryhmd3fvcyoKJkqVsURCU6eYfBROqg5BDdlHXnHp9tzNsAlJSViBKLKf96tE9NLrm7/ ZJ9GUWcgb06GhCMXHwAjQy4o0ZBahfhZTjHcRtr13RyH4uq2cx+PlejySP8/VP9kp1af qlt0HuV5HyTTNQ6f6R02249IgVb+6oCStzg9wkyjHChQrPhUs4yW7gWSoJe8rpWEqJBi CwYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=qkSLMEwh; arc=pass (i=1 spf=pass spfdomain=rere.qmqm.pl dkim=pass dkdomain=rere.qmqm.pl dmarc=pass fromdomain=rere.qmqm.pl); spf=pass (google.com: domain of linux-kernel+bounces-162472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162472-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=rere.qmqm.pl Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m8-20020a170902f64800b001eb084c752csi6123420plg.267.2024.04.29.07.46.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 07:46:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=qkSLMEwh; arc=pass (i=1 spf=pass spfdomain=rere.qmqm.pl dkim=pass dkdomain=rere.qmqm.pl dmarc=pass fromdomain=rere.qmqm.pl); spf=pass (google.com: domain of linux-kernel+bounces-162472-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162472-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=rere.qmqm.pl Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 85C202820C3 for ; Mon, 29 Apr 2024 14:46:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E76B82498; Mon, 29 Apr 2024 14:45:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="qkSLMEwh" Received: from rere.qmqm.pl (rere.qmqm.pl [91.227.64.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B923A7EF18 for ; Mon, 29 Apr 2024 14:45:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.227.64.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714401940; cv=none; b=sB4pmJsrrKbwlBCW5fmdgKZnjDjNmqzFrbfTuM1ANwvYhuCXfxElUTCqz3mdvwWvTbJWG8wPrUtVaEslWJoWkStGsQRIofRRBe2puEUy82LdbeV9vaM9Nt92aZvzN0s9bHNqx1qlz53Z7cj7CyEeVKgVaV7/68yWOe7nKCnG9jU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714401940; c=relaxed/simple; bh=VgBNW+KxT7+rgLFryVkEDoWc1+7GQwAEoJRu2QC0sx4=; h=Date:Message-Id:In-Reply-To:References:Subject:MIME-Version: Content-Type:From:To:Cc; b=QIsaWM3VA/fkpN6Gh5uCsgTLnQjjGuoWhgPUt8mqMjFGEkYwP+Fx9qH6sRmz1NWkP76Mh5Ux7YLKLMn/oskjRMenWjo1vkTT8tMqmLG8x4eqFHWC4uYRVmtNZVrz7sLXeZfqvU5VzZJtMSSvEJhJpgLVW9TEocW4Eyr7BBHzpQc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rere.qmqm.pl; spf=pass smtp.mailfrom=rere.qmqm.pl; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b=qkSLMEwh; arc=none smtp.client-ip=91.227.64.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rere.qmqm.pl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rere.qmqm.pl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1714401930; bh=VgBNW+KxT7+rgLFryVkEDoWc1+7GQwAEoJRu2QC0sx4=; h=Date:In-Reply-To:References:Subject:From:To:Cc:From; b=qkSLMEwhPh9Cx193H1xCghs8GC2tPDH04D8kAJUKmPTYsZUrvIAiFquMvxb6BQ0AM nbEcqRRBfZt3+2laeih6pEbZX/0BXXxqxBM1lhfEUT/qLOtUHn87iPPv6+1OzSqB2I YzsDVFKkOojnyBtEJ3mlwg3a0iCHRTnj10oT9aZqhtmn33oHnDwEmlkR0UT7ibqTyj ZURO2As//UBNR7MbiWbbRF7cX9X3yLA8hym/3V5kbJnfIFQSKq+Tha5u6WrhlRTT3v hei0dV7CmK8mJpBj3C0MufuE+fFEkitVeOIrneZCF4kap4ddBW8KqdaXtU6nOteOcI 5LC6fyr8oyjFA== Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4VSmMs6XZBzKb; Mon, 29 Apr 2024 16:45:29 +0200 (CEST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 1.0.5 at mail Date: Mon, 29 Apr 2024 16:45:29 +0200 Message-Id: <799e847ea819c9972d4c0b6a7f427a41ff652412.1714399603.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: Subject: [PATCH v2 06/12] regulator/core: remove regulator_init callback Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org There are no in-tree users. The only usage went away in 2019 in 8c44e448583c ("regulator: stpmic1: Simplify regulators registration"). Signed-off-by: Michał Mirosław --- drivers/regulator/core.c | 7 ------- include/linux/regulator/machine.h | 7 ++----- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 4cb30e49c03d..be45983e1d23 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -5679,13 +5679,6 @@ regulator_register(struct device *dev, resolved_early = true; } - /* perform any regulator specific init */ - if (init_data && init_data->regulator_init) { - ret = init_data->regulator_init(rdev->reg_data); - if (ret < 0) - goto wash; - } - if (config->ena_gpiod) { ret = regulator_ena_gpio_request(rdev, config); if (ret != 0) { diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 0cd76d264727..7c39dbc33290 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h @@ -274,8 +274,7 @@ struct regulator_consumer_supply { * @num_consumer_supplies: Number of consumer device supplies. * @consumer_supplies: Consumer device supply configuration. * - * @regulator_init: Callback invoked when the regulator has been registered. - * @driver_data: Data passed to regulator_init. + * @driver_data: Pointer copied to regulator_dev.reg_data. */ struct regulator_init_data { const char *supply_regulator; /* or NULL for system supply */ @@ -285,9 +284,7 @@ struct regulator_init_data { int num_consumer_supplies; struct regulator_consumer_supply *consumer_supplies; - /* optional regulator machine specific init */ - int (*regulator_init)(void *driver_data); - void *driver_data; /* core does not touch this */ + void *driver_data; }; #ifdef CONFIG_REGULATOR -- 2.39.2