mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Added SPL_AC_5ARGS_DEVICE_CREATE autoconf configure check
As of 2.6.27 kernels the device_create() API changed to include a private data argument. This check detects which version of device_create() function the kernel has and properly defines spl_device_create() to use the correct prototype.
This commit is contained in:
@@ -13,8 +13,15 @@ typedef struct device spl_device;
|
||||
|
||||
#define spl_class_create(mod, name) class_create(mod, name)
|
||||
#define spl_class_destroy(cls) class_destroy(cls)
|
||||
#define spl_device_create(cls, parent, devt, device, fmt, args...) \
|
||||
|
||||
# ifdef HAVE_5ARGS_DEVICE_CREATE
|
||||
# define spl_device_create(cls, parent, devt, drvdata, fmt, args...) \
|
||||
device_create(cls, parent, devt, drvdata, fmt, ## args)
|
||||
# else
|
||||
# define spl_device_create(cls, parent, devt, drvdata, fmt, args...) \
|
||||
device_create(cls, parent, devt, fmt, ## args)
|
||||
# endif
|
||||
|
||||
#define spl_device_destroy(cls, cls_dev, devt) \
|
||||
device_destroy(cls, devt)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user