Commit ba358841 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding
Browse files

host1x: Make remove callback return void



The return value of struct device_driver::remove is ignored by the core
(see device_remove() in drivers/base/dd.c). So it doesn't make sense to
let the host1x remove callback return an int just to ignore it later.

So make the callback return void. All current implementors return 0, so
they are easily converted.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # tegra20 tegra-video
Reviewed-by: default avatarLuca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/d364fd4ec043d36ee12e46eaef98c57658884f63.1765355236.git.u.kleine-koenig@baylibre.com
parent 4a768c54
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -401,11 +401,9 @@ static int tegra_se_host1x_probe(struct host1x_device *dev)
	return host1x_device_init(dev);
}

static int tegra_se_host1x_remove(struct host1x_device *dev)
static void tegra_se_host1x_remove(struct host1x_device *dev)
{
	host1x_device_exit(dev);

	return 0;
}

static struct host1x_driver tegra_se_host1x_driver = {
+1 −3
Original line number Diff line number Diff line
@@ -1301,7 +1301,7 @@ static int host1x_drm_probe(struct host1x_device *dev)
	return err;
}

static int host1x_drm_remove(struct host1x_device *dev)
static void host1x_drm_remove(struct host1x_device *dev)
{
	struct drm_device *drm = dev_get_drvdata(&dev->dev);
	struct tegra_drm *tegra = drm->dev_private;
@@ -1330,8 +1330,6 @@ static int host1x_drm_remove(struct host1x_device *dev)

	kfree(tegra);
	drm_dev_put(drm);

	return 0;
}

static void host1x_drm_shutdown(struct host1x_device *dev)
+1 −1
Original line number Diff line number Diff line
@@ -640,7 +640,7 @@ static int host1x_device_remove(struct device *dev)
	struct host1x_device *device = to_host1x_device(dev);

	if (driver->remove)
		return driver->remove(device);
		driver->remove(device);

	return 0;
}
+1 −3
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ static int host1x_video_probe(struct host1x_device *dev)
	return ret;
}

static int host1x_video_remove(struct host1x_device *dev)
static void host1x_video_remove(struct host1x_device *dev)
{
	struct tegra_video_device *vid = dev_get_drvdata(&dev->dev);

@@ -118,8 +118,6 @@ static int host1x_video_remove(struct host1x_device *dev)

	/* This calls v4l2_dev release callback on last reference */
	v4l2_device_put(&vid->v4l2_dev);

	return 0;
}

static const struct of_device_id host1x_video_subdevs[] = {
+1 −1
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ struct host1x_driver {
	struct list_head list;

	int (*probe)(struct host1x_device *device);
	int (*remove)(struct host1x_device *device);
	void (*remove)(struct host1x_device *device);
	void (*shutdown)(struct host1x_device *device);
};