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 <sruffell@sruffell.net>
This commit is contained in:
Shaun Ruffell 2019-01-11 05:12:09 +00:00
parent 4f3a724036
commit d9cf68685e
2 changed files with 4 additions and 10 deletions

View File

@ -33,9 +33,11 @@
/* shortcuts, for code readability */ /* shortcuts, for code readability */
#define MAKE_DAHDI_DEV(num, name) \ #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) \ #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; static struct class *dahdi_class;

View File

@ -21,14 +21,6 @@
#define DRIVER_ATTR_READER(name, drv, buf) \ #define DRIVER_ATTR_READER(name, drv, buf) \
ssize_t name(struct device_driver *drv, char * 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 */ /* Global */
int __init dahdi_sysfs_chan_init(const struct file_operations *fops); int __init dahdi_sysfs_chan_init(const struct file_operations *fops);
void dahdi_sysfs_chan_exit(void); void dahdi_sysfs_chan_exit(void);