Commit 388dba30 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

Driver-Core: fix devnode callbacks for dabusb and industrialio

The build of the dabusb driver broke:

  drivers/media/video/dabusb.c:758: error: unknown field 'nodename' specified in initializer
  drivers/media/video/dabusb.c:758: warning: initialization from incompatible pointer type
  make[3]: *** wait: No child processes.  Stop.

Due to this commit:

  e454cea2: Driver-Core: extend devnode callbacks to provide permissions

Missing the dabusb driver's dabusb_nodename() callback.

Similar issues with the iio/industrialio driver in staging, pointed out
and patched by Jean Delvare.
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Industrialio-parts-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ebc79c4f
...@@ -748,14 +748,14 @@ static const struct file_operations dabusb_fops = ...@@ -748,14 +748,14 @@ static const struct file_operations dabusb_fops =
.release = dabusb_release, .release = dabusb_release,
}; };
static char *dabusb_nodename(struct device *dev) static char *dabusb_devnode(struct device *dev, mode_t *mode)
{ {
return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev)); return kasprintf(GFP_KERNEL, "usb/%s", dev_name(dev));
} }
static struct usb_class_driver dabusb_class = { static struct usb_class_driver dabusb_class = {
.name = "dabusb%d", .name = "dabusb%d",
.nodename = dabusb_nodename, .devnode = dabusb_devnode,
.fops = &dabusb_fops, .fops = &dabusb_fops,
.minor_base = DABUSB_MINOR, .minor_base = DABUSB_MINOR,
}; };
......
...@@ -39,14 +39,14 @@ dev_t iio_devt; ...@@ -39,14 +39,14 @@ dev_t iio_devt;
EXPORT_SYMBOL(iio_devt); EXPORT_SYMBOL(iio_devt);
#define IIO_DEV_MAX 256 #define IIO_DEV_MAX 256
static char *iio_nodename(struct device *dev) static char *iio_devnode(struct device *dev, mode_t *mode)
{ {
return kasprintf(GFP_KERNEL, "iio/%s", dev_name(dev)); return kasprintf(GFP_KERNEL, "iio/%s", dev_name(dev));
} }
struct class iio_class = { struct class iio_class = {
.name = "iio", .name = "iio",
.nodename = iio_nodename, .devnode = iio_devnode,
}; };
EXPORT_SYMBOL(iio_class); EXPORT_SYMBOL(iio_class);
......
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