Commit 945862d7 authored by Federico Vaga's avatar Federico Vaga

drv: class methods use const struct device

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 538ac8e5
......@@ -28,7 +28,11 @@
static DEFINE_MUTEX(zmutex);
static struct zio_status *zstat = &zio_global_status; /* Always use ptr */
#if KERNEL_VERSION(6,2,0) <= LINUX_VERSION_CODE
static int zio_dev_uevent(const struct device *dev, struct kobj_uevent_env *env)
#else
static int zio_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
#endif
{
unsigned long *flags;
......@@ -38,10 +42,10 @@ static int zio_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
return 0;
}
#if LINUX_VERSION_CODE > KERNEL_VERSION(3,2,0)
static char *zio_devnode(struct device *dev, umode_t *mode)
#if KERNEL_VERSION(6,2,0) <= LINUX_VERSION_CODE
static char *zio_devnode(const struct device *dev, umode_t *mode)
#else
static char *zio_devnode(struct device *dev, mode_t *mode)
static char *zio_devnode(struct device *dev, umode_t *mode)
#endif
{
return kasprintf(GFP_KERNEL, "zio/%s", dev_name(dev));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment