From f4585397ab57771572daf8b4ec59230ec62b9eae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 25 Apr 2022 21:23:06 +0200 Subject: [PATCH] drm/ssd130x: Make ssd130x_remove() return void MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This function returns zero unconditionally, so there isn't any benefit of returning a value. Make it return void to be able to see at a glance that the return value of ssd130x_i2c_remove() is always zero. This patch is a preparation for making i2c remove callbacks return void. Signed-off-by: Uwe Kleine-König Acked-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20220425192306.59800-1-u.kleine-koenig@pengutronix.de --- drivers/gpu/drm/solomon/ssd130x-i2c.c | 4 +++- drivers/gpu/drm/solomon/ssd130x.c | 4 +--- drivers/gpu/drm/solomon/ssd130x.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/solomon/ssd130x-i2c.c b/drivers/gpu/drm/solomon/ssd130x-i2c.c index d6835ec71c394..1e0fcec7be476 100644 --- a/drivers/gpu/drm/solomon/ssd130x-i2c.c +++ b/drivers/gpu/drm/solomon/ssd130x-i2c.c @@ -43,7 +43,9 @@ static int ssd130x_i2c_remove(struct i2c_client *client) { struct ssd130x_device *ssd130x = i2c_get_clientdata(client); - return ssd130x_remove(ssd130x); + ssd130x_remove(ssd130x); + + return 0; } static void ssd130x_i2c_shutdown(struct i2c_client *client) diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c index ba2de93d00f0a..08394444dd6e3 100644 --- a/drivers/gpu/drm/solomon/ssd130x.c +++ b/drivers/gpu/drm/solomon/ssd130x.c @@ -924,11 +924,9 @@ struct ssd130x_device *ssd130x_probe(struct device *dev, struct regmap *regmap) } EXPORT_SYMBOL_GPL(ssd130x_probe); -int ssd130x_remove(struct ssd130x_device *ssd130x) +void ssd130x_remove(struct ssd130x_device *ssd130x) { drm_dev_unplug(&ssd130x->drm); - - return 0; } EXPORT_SYMBOL_GPL(ssd130x_remove); diff --git a/drivers/gpu/drm/solomon/ssd130x.h b/drivers/gpu/drm/solomon/ssd130x.h index d14f78c2eb073..4c4a84e962e72 100644 --- a/drivers/gpu/drm/solomon/ssd130x.h +++ b/drivers/gpu/drm/solomon/ssd130x.h @@ -86,7 +86,7 @@ struct ssd130x_device { extern const struct ssd130x_deviceinfo ssd130x_variants[]; struct ssd130x_device *ssd130x_probe(struct device *dev, struct regmap *regmap); -int ssd130x_remove(struct ssd130x_device *ssd130x); +void ssd130x_remove(struct ssd130x_device *ssd130x); void ssd130x_shutdown(struct ssd130x_device *ssd130x); #endif /* __SSD1307X_H__ */ -- 2.39.5