Commit d05d9eb7 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net-dsa-remove-unnecessary-set_drvdata'

Yang Yingliang says:

====================
net: dsa: remove unnecessary set_drvdata()

In this patch set, I removed all set_drvdata(NULL) functions
in ->remove() in drivers/net/dsa/.

The driver_data will be set to NULL in device_unbind_cleanup()
after calling ->remove(), so all set_drvdata(NULL) functions
in ->remove() is redundant, they can be removed.

Here is the previous patch set:
https://lore.kernel.org/netdev/facfc855-d082-cc1c-a0bc-027f562a2f45@huawei.com/T/
====================

Link: https://lore.kernel.org/r/20220921140524.3831101-1-yangyingliang@huawei.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 304843c7 24aeeb10
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -356,8 +356,6 @@ static void b53_mdio_remove(struct mdio_device *mdiodev)
		return;

	b53_switch_remove(dev);

	dev_set_drvdata(&mdiodev->dev, NULL);
}

static void b53_mdio_shutdown(struct mdio_device *mdiodev)
+0 −2
Original line number Diff line number Diff line
@@ -316,8 +316,6 @@ static int b53_mmap_remove(struct platform_device *pdev)
	if (dev)
		b53_switch_remove(dev);

	platform_set_drvdata(pdev, NULL);

	return 0;
}

+0 −2
Original line number Diff line number Diff line
@@ -667,8 +667,6 @@ static int b53_srab_remove(struct platform_device *pdev)
	b53_srab_intr_set(dev->priv, false);
	b53_switch_remove(dev);

	platform_set_drvdata(pdev, NULL);

	return 0;
}

+0 −2
Original line number Diff line number Diff line
@@ -1551,8 +1551,6 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev)
	if (priv->type == BCM7278_DEVICE_ID)
		reset_control_assert(priv->rcdev);

	platform_set_drvdata(pdev, NULL);

	return 0;
}

+0 −2
Original line number Diff line number Diff line
@@ -351,8 +351,6 @@ static void dsa_loop_drv_remove(struct mdio_device *mdiodev)

	dsa_unregister_switch(ds);
	dev_put(ps->netdev);

	dev_set_drvdata(&mdiodev->dev, NULL);
}

static void dsa_loop_drv_shutdown(struct mdio_device *mdiodev)
Loading