From be87e0b1f299b38c43265fe27779c36bc26cca40 Mon Sep 17 00:00:00 2001 From: lanshh Date: Fri, 9 Sep 2016 10:30:28 +0800 Subject: [PATCH] drivers: iio: imu: remove sync attribute in sysfs, we direct access hid-rkvr by ioctl Change-Id: Ic3605da06f3c8388910b162cf468e03709a98dd0 Signed-off-by: lanshh --- drivers/staging/iio/imu/inv_mpu/inv_mpu_hid.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/staging/iio/imu/inv_mpu/inv_mpu_hid.c b/drivers/staging/iio/imu/inv_mpu/inv_mpu_hid.c index b05d70a4f8bf..52e9fe0c84f5 100644 --- a/drivers/staging/iio/imu/inv_mpu/inv_mpu_hid.c +++ b/drivers/staging/iio/imu/inv_mpu/inv_mpu_hid.c @@ -20,7 +20,6 @@ #include #include #include -#include "../../../../hid/hid-rkvr.h" #include "inv_mpu_iio.h" static int inv_hid_read(struct inv_mpu_iio_s *st, u8 reg, int len, u8 *data) @@ -65,14 +64,6 @@ static struct mpu_platform_data mpu_data = { }, }; -static ssize_t inv_dev_attr_sync_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - return rkvr_sensor_sync_inv(buf, count); -} - -static DEVICE_ATTR(sync, S_IWUSR, NULL, inv_dev_attr_sync_store); - /** * inv_mpu_probe() - probe function. */ @@ -142,17 +133,12 @@ static int inv_mpu_probe(struct platform_device *pdev) goto out_remove_trigger; } - result = device_create_file(&indio_dev->dev, &dev_attr_sync); - if (result < 0) { - dev_err(&pdev->dev, "create sync sys file failed\n"); - goto out_unreg_iio; - } if (INV_MPU6050 == st->chip_type || INV_MPU6500 == st->chip_type) { result = inv_create_dmp_sysfs(indio_dev); if (result) { dev_err(&pdev->dev, "create dmp sysfs failed\n"); - goto out_rmsync_iio; + goto out_unreg_iio; } } @@ -162,8 +148,6 @@ static int inv_mpu_probe(struct platform_device *pdev) indio_dev->name); return 0; -out_rmsync_iio: - device_remove_file(&indio_dev->dev, &dev_attr_sync); out_unreg_iio: iio_device_unregister(indio_dev); out_remove_trigger: @@ -192,7 +176,6 @@ static int inv_mpu_remove(struct platform_device *pdev) struct inv_mpu_iio_s *st = iio_priv(indio_dev); kfifo_free(&st->timestamps); - device_remove_file(&indio_dev->dev, &dev_attr_sync); iio_device_unregister(indio_dev); if (indio_dev->modes & INDIO_BUFFER_TRIGGERED) inv_mpu_remove_trigger(indio_dev); -- 2.34.1