From d9cf68685e96d8766421680d76e47eff0b065058 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 11 Jan 2019 05:12:09 +0000 Subject: [PATCH] Remove CLASS_DEV_CREATE / CLASS_DEV_DESTROY macros. All supported kernel versions use the same signature for device_create / device_destroy so we no longer need these macros. Signed-off-by: Shaun Ruffell --- drivers/dahdi/dahdi-sysfs-chan.c | 6 ++++-- drivers/dahdi/dahdi-sysfs.h | 8 -------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/dahdi/dahdi-sysfs-chan.c b/drivers/dahdi/dahdi-sysfs-chan.c index 125a355..a91e6ed 100644 --- a/drivers/dahdi/dahdi-sysfs-chan.c +++ b/drivers/dahdi/dahdi-sysfs-chan.c @@ -33,9 +33,11 @@ /* shortcuts, for code readability */ #define MAKE_DAHDI_DEV(num, name) \ - CLASS_DEV_CREATE(dahdi_class, MKDEV(DAHDI_MAJOR, num), NULL, name) + device_create(dahdi_class, NULL, MKDEV(DAHDI_MAJOR, num), \ + NULL, "%s", name) + #define DEL_DAHDI_DEV(num) \ - CLASS_DEV_DESTROY(dahdi_class, MKDEV(DAHDI_MAJOR, num)) + device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, num)) static struct class *dahdi_class; diff --git a/drivers/dahdi/dahdi-sysfs.h b/drivers/dahdi/dahdi-sysfs.h index a6f2479..d8bdb42 100644 --- a/drivers/dahdi/dahdi-sysfs.h +++ b/drivers/dahdi/dahdi-sysfs.h @@ -21,14 +21,6 @@ #define DRIVER_ATTR_READER(name, drv, buf) \ ssize_t name(struct device_driver *drv, char * buf) -/* Device file creation macros */ -#define CLASS_DEV_CREATE(class, devt, device, name) \ - device_create(class, device, devt, NULL, "%s", name) - -/* Device file destruction macros */ -#define CLASS_DEV_DESTROY(class, devt) \ - device_destroy(class, devt) - /* Global */ int __init dahdi_sysfs_chan_init(const struct file_operations *fops); void dahdi_sysfs_chan_exit(void);