From: Geordan Neukum Date: Sun, 26 May 2019 01:18:27 +0000 (+0000) Subject: staging: kpc2000: kpc_i2c: Remove unused rw_sem X-Git-Tag: v5.4-rc1~602^2~382 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f82ce45273d4d8173243f08b943c9c371385c105;p=platform%2Fkernel%2Flinux-rpi.git staging: kpc2000: kpc_i2c: Remove unused rw_sem In pi2c_probe, a rw_sem is initialized and stashed off in the i2c_device private runtime state struct. This rw_sem is never used after initialization. Remove the rw_sem and cleanup unneeded header inclusion. Signed-off-by: Geordan Neukum Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c b/drivers/staging/kpc2000/kpc2000_i2c.c index fb9a838..2c272ad 100644 --- a/drivers/staging/kpc2000/kpc2000_i2c.c +++ b/drivers/staging/kpc2000/kpc2000_i2c.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include "kpc.h" @@ -38,7 +37,6 @@ struct i2c_device { unsigned long smba; struct i2c_adapter adapter; struct platform_device *pldev; - struct rw_semaphore rw_sem; unsigned int features; }; @@ -606,7 +604,6 @@ static int pi2c_probe(struct platform_device *pldev) priv->features |= FEATURE_BLOCK_BUFFER; //init_MUTEX(&lddata->sem); - init_rwsem(&priv->rw_sem); /* set up the sysfs linkage to our parent device */ priv->adapter.dev.parent = &pldev->dev;