Commit d40c2d4e authored by Hsin-Hsiung Wang's avatar Hsin-Hsiung Wang Committed by Greg Kroah-Hartman
Browse files
parent 0be0a733
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -359,6 +359,14 @@ static int spmi_drv_remove(struct device *dev)
	return 0;
}

static void spmi_drv_shutdown(struct device *dev)
{
	const struct spmi_driver *sdrv = to_spmi_driver(dev->driver);

	if (sdrv && sdrv->shutdown)
		sdrv->shutdown(to_spmi_device(dev));
}

static int spmi_drv_uevent(struct device *dev, struct kobj_uevent_env *env)
{
	int ret;
@@ -375,6 +383,7 @@ static struct bus_type spmi_bus_type = {
	.match		= spmi_device_match,
	.probe		= spmi_drv_probe,
	.remove		= spmi_drv_remove,
	.shutdown	= spmi_drv_shutdown,
	.uevent		= spmi_drv_uevent,
};

+1 −0
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@ struct spmi_driver {
	struct device_driver driver;
	int	(*probe)(struct spmi_device *sdev);
	void	(*remove)(struct spmi_device *sdev);
	void	(*shutdown)(struct spmi_device *sdev);
};

static inline struct spmi_driver *to_spmi_driver(struct device_driver *d)