Skip to content
Snippets Groups Projects
Commit 722af604 authored by Federico Vaga's avatar Federico Vaga
Browse files

chardev.c: add parent device (channel) to cdev device


This help user-space programs which use libudev to rebuild the ZIO
device structure

Signed-off-by: default avatarFederico Vaga <federico.vaga@gmail.com>
Acked-by: default avatarAlessandro Rubini <rubini@gnudd.com>
parent 10091c36
Branches
Tags
No related merge requests found
......@@ -182,8 +182,8 @@ int zio_create_chan_devices(struct zio_channel *chan)
devt_c = zstat->basedev + chan->cset->minor + chan->index * 2;
pr_debug("%s:%d dev_t=0x%x\n", __func__, __LINE__, devt_c);
chan->ctrl_dev = device_create(&zio_cdev_class, NULL, devt_c, &chan->flags,
"%s-%i-%i-ctrl",
chan->ctrl_dev = device_create(&zio_cdev_class, &chan->head.dev, devt_c,
&chan->flags, "%s-%i-%i-ctrl",
dev_name(&chan->cset->zdev->head.dev),
chan->cset->index,
chan->index);
......@@ -194,8 +194,8 @@ int zio_create_chan_devices(struct zio_channel *chan)
devt_d = devt_c + 1;
pr_debug("%s:%d dev_t=0x%x\n", __func__, __LINE__, devt_d);
chan->data_dev = device_create(&zio_cdev_class, NULL, devt_d, &chan->flags,
"%s-%i-%i-data",
chan->data_dev = device_create(&zio_cdev_class, &chan->head.dev, devt_d,
&chan->flags, "%s-%i-%i-data",
dev_name(&chan->cset->zdev->head.dev),
chan->cset->index,
chan->index);
......
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