From patchwork Wed Jul 26 08:14:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 1813013 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R9msm72tTz1yY5 for ; Wed, 26 Jul 2023 18:15:08 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4R9msl0f46z3cL3 for ; Wed, 26 Jul 2023 18:15:07 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=pengutronix.de (client-ip=2001:67c:670:201:290:27ff:fe1d:cc33; helo=metis.ext.pengutronix.de; envelope-from=ukl@pengutronix.de; receiver=lists.ozlabs.org) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4R9msV4mRqz2ygx for ; Wed, 26 Jul 2023 18:14:53 +1000 (AEST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOZfV-0000Zj-JB; Wed, 26 Jul 2023 10:14:49 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qOZfR-002C2Y-Jo; Wed, 26 Jul 2023 10:14:45 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qOZfQ-007stT-W4; Wed, 26 Jul 2023 10:14:45 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Michael Ellerman Subject: [PATCH] powerpc/ep8248e: Mark driver as non removable Date: Wed, 26 Jul 2023 10:14:42 +0200 Message-Id: <20230726081442.461026-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1347; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=PDWs5JAlrNOGIjp5YqlSuu43p8NmbNVpVUAxrqR3Q1w=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBkwNXxr7pTKKEQaiTWvalMjlgR6MTU8tm47sshP /TUSK8LvCyJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZMDV8QAKCRCPgPtYfRL+ Tv2UB/9bK+LJ4j/S50aD1SeweG0pS+RatV/XvCSYazitR+YuNPY+Dl9kfktM23ppZDRMQzpCPo4 18CplkiiE04FQKv9Jyl5eCzjuS3OcRgiyfeH7q909PZbckZi2GU8xxwATCbGGlOxPHPyVo7ktwH kw7tA6xyDu1cDZ+wN8+pfnj9XNw3/m0RflIMXblV6GZBf9PUMPpA7A2ZqCFFr2MsjdYCqE6NMf2 q6UyJoq3apVVkMScidQw6/M7L4ZSMZAvCYfSKFz0aPX37QiXIhVuU4uKFzajorrEYLV9GNWgGmw LIGA7cpbwdY4zYWN1T24HQSzq11cGSRtIKrHSVJwP1PfCAkC X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel@pengutronix.de, linuxppc-dev@lists.ozlabs.org, Nicholas Piggin Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Instead of resorting to BUG() ensure that the driver isn't unbound by suppressing its bind and unbind sysfs attributes. As the driver is built-in there is no way to remove a device once bound. As a nice side effect this allows to drop the remove function. Signed-off-by: Uwe Kleine-König --- arch/powerpc/platforms/82xx/ep8248e.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 8f1856ba692e..3409cf04b630 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c @@ -140,12 +140,6 @@ static int ep8248e_mdio_probe(struct platform_device *ofdev) return ret; } -static int ep8248e_mdio_remove(struct platform_device *ofdev) -{ - BUG(); - return 0; -} - static const struct of_device_id ep8248e_mdio_match[] = { { .compatible = "fsl,ep8248e-mdio-bitbang", @@ -157,9 +151,9 @@ static struct platform_driver ep8248e_mdio_driver = { .driver = { .name = "ep8248e-mdio-bitbang", .of_match_table = ep8248e_mdio_match, + .suppress_bind_attrs = true, }, .probe = ep8248e_mdio_probe, - .remove = ep8248e_mdio_remove, }; struct cpm_pin {