summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/vibrator.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2016-09-08 15:47:30 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-09-19 16:30:41 +0200
commit06000c03174988b4e8167d03ad0a36c6792686cb (patch)
treef0984b3198e9a386df9f9a00cb58152eae8e64c9 /drivers/staging/greybus/vibrator.c
parentbe21106d67db9ad3c66e48c8efdcf1bc08be45a4 (diff)
downloadop-kernel-dev-06000c03174988b4e8167d03ad0a36c6792686cb.zip
op-kernel-dev-06000c03174988b4e8167d03ad0a36c6792686cb.tar.gz
staging: greybus: vibrator: remove KERNEL_VERSION checks
No need to support older kernel versions in the Greybus Vibrator driver, so remove the checks as needed, we can now rely on all of the correct driver core apis being present. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/vibrator.c')
-rw-r--r--drivers/staging/greybus/vibrator.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/staging/greybus/vibrator.c b/drivers/staging/greybus/vibrator.c
index 7296a4d..4ba0e16 100644
--- a/drivers/staging/greybus/vibrator.c
+++ b/drivers/staging/greybus/vibrator.c
@@ -108,9 +108,7 @@ ATTRIBUTE_GROUPS(vibrator);
static struct class vibrator_class = {
.name = "vibrator",
.owner = THIS_MODULE,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
.dev_groups = vibrator_groups,
-#endif
};
static DEFINE_IDA(minors);
@@ -169,19 +167,6 @@ static int gb_vibrator_probe(struct gb_bundle *bundle,
}
vib->dev = dev;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,11,0)
- /*
- * Newer kernels handle this in a race-free manner, by the dev_groups
- * field in the struct class up above. But for older kernels, we need
- * to "open code this :(
- */
- retval = sysfs_create_group(&dev->kobj, vibrator_groups[0]);
- if (retval) {
- device_unregister(dev);
- goto err_ida_remove;
- }
-#endif
-
INIT_DELAYED_WORK(&vib->delayed_work, gb_vibrator_worker);
gb_pm_runtime_put_autosuspend(bundle);
@@ -212,9 +197,6 @@ static void gb_vibrator_disconnect(struct gb_bundle *bundle)
if (cancel_delayed_work_sync(&vib->delayed_work))
turn_off(vib);
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,11,0)
- sysfs_remove_group(&vib->dev->kobj, vibrator_groups[0]);
-#endif
device_unregister(vib->dev);
ida_simple_remove(&minors, vib->minor);
gb_connection_disable(vib->connection);
OpenPOWER on IntegriCloud