From nobody Tue Feb 10 20:29:34 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CCBA5D737 for ; Mon, 25 Mar 2024 22:14:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711404854; cv=none; b=CiqFJRr3CjjI3i5bSVQ6qxVaBQZt8svMMfr1KJBR9WpLTv3mJf92Vf6ZWGnUyVl46Mh3tuoQpdw7floPExy3+jkPZWOnn0h3t/IgKURM7GJmXP3Yhw7/0WKkg7z8p8XmtlbaVvOlCKXwqAa1unbD83Rcso8RvZrlGTbun7mg1j4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711404854; c=relaxed/simple; bh=Dq91DUOv3LbPewimm3YVR7sgRj5Hcl1z/IZXjKreQxo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=jrH7ZVWk3/ymhAUaobfuydtGu/nmDVURCMUx5NYFpYig0TW8AL9VtNO3glJEhi5FEXVy0wBmNp1xMZSAWyDBc19TikQ6KB3a1rlOAohtHm3ewke2kC9tSQD4pJ1GBZjVMy+hM+giJiBCUOhqK/nrtvX3uopCsYravYellbHm51g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RPfBkMcQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RPfBkMcQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8167C433F1; Mon, 25 Mar 2024 22:14:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711404854; bh=Dq91DUOv3LbPewimm3YVR7sgRj5Hcl1z/IZXjKreQxo=; h=From:To:Cc:Subject:Date:From; b=RPfBkMcQNrTErKXKdRqaMRotVmmPyyTNTDikF7xG/VYdELsxR+e2BHM9mvwi3EexN v/iVfM7nPfvnbQQXg0Lsa/ME1RCKAreNw6Eaq1YyLM9gLXpvDp33RpHoXSU3rE0AQs BKYjuWfinkYGyxQ/IBg/ENtPf0gLAGm/D21w6411NBEisNXpmAYMSg7RlW7I9qJi64 smzcZL8rXsNYs4VVV78G7Q3aWtFtYNmsGKOzy2AELPlPG+2nyCU3zhBWNp6NTXSqAG Dv5ngqQHZ9BzvTz1fD1z4mjtrJi0stW5OWm3MsKevt8wr/sdNix6hf6g0h+DSxID+m DWaJ2zFYp4N0Q== From: Bjorn Helgaas To: Greg Kroah-Hartman Cc: "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, Bjorn Helgaas , Heikki Krogerus , Andy Shevchenko , Linus Walleij Subject: [PATCH] driver core: Remove unused platform_notify, platform_notify_remove Date: Mon, 25 Mar 2024 17:14:09 -0500 Message-Id: <20240325221409.1457036-1-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Bjorn Helgaas The "platform_notify" and "platform_notify_remove" hooks have been unused since 00ba9357d189 ("ARM: ixp4xx: Drop custom DMA coherency and bouncing"). Remove "platform_notify" and "platform_notify_remove". No functional change intended. Signed-off-by: Bjorn Helgaas Cc: Heikki Krogerus Cc: Andy Shevchenko Cc: Linus Walleij Acked-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko --- drivers/base/core.c | 8 -------- include/linux/device.h | 11 ----------- 2 files changed, 19 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index b93f3c5716ae..78dfa74ee18b 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -2331,8 +2331,6 @@ static void fw_devlink_link_device(struct device *dev) =20 /* Device links support end. */ =20 -int (*platform_notify)(struct device *dev) =3D NULL; -int (*platform_notify_remove)(struct device *dev) =3D NULL; static struct kobject *dev_kobj; =20 /* /sys/dev/char */ @@ -2380,16 +2378,10 @@ static void device_platform_notify(struct device *d= ev) acpi_device_notify(dev); =20 software_node_notify(dev); - - if (platform_notify) - platform_notify(dev); } =20 static void device_platform_notify_remove(struct device *dev) { - if (platform_notify_remove) - platform_notify_remove(dev); - software_node_notify_remove(dev); =20 acpi_device_notify_remove(dev); diff --git a/include/linux/device.h b/include/linux/device.h index 97c4b046c09d..c515ba5756e4 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1206,17 +1206,6 @@ int __must_check devm_device_add_groups(struct devic= e *dev, int __must_check devm_device_add_group(struct device *dev, const struct attribute_group *grp); =20 -/* - * Platform "fixup" functions - allow the platform to have their say - * about devices and actions that the general device layer doesn't - * know about. - */ -/* Notify platform of device discovery */ -extern int (*platform_notify)(struct device *dev); - -extern int (*platform_notify_remove)(struct device *dev); - - /* * get_device - atomically increment the reference count for the device. * --=20 2.34.1