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 <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Geordan Neukum 2019-05-26 01:18:27 +00:00 committed by Greg Kroah-Hartman
parent 46144c1391
commit f82ce45273

View File

@ -25,7 +25,6 @@
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/fs.h>
#include <linux/rwsem.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#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;