search for: pdrvdata

Displaying 20 results from an estimated 83 matches for "pdrvdata".

2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
...gned-off-by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 1b456fe..ad2cd6d 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2215,7 +2215,7 @@ static int __init init(void) } pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); - if (!pdrvdata.debugfs_dir) { + if (IS_ERR_OR_NULL(pdrvdata.debugfs_dir)) { pr_warning("Error %ld creating debugfs dir for virtio-ports\n", PTR_ERR(pdrvdata.debugfs_dir)); }
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
...gned-off-by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 1b456fe..ad2cd6d 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2215,7 +2215,7 @@ static int __init init(void) } pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); - if (!pdrvdata.debugfs_dir) { + if (IS_ERR_OR_NULL(pdrvdata.debugfs_dir)) { pr_warning("Error %ld creating debugfs dir for virtio-ports\n", PTR_ERR(pdrvdata.debugfs_dir)); }
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
...ed. Arnd > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 1b456fe..ad2cd6d 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -2215,7 +2215,7 @@ static int __init init(void) > } > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > - if (!pdrvdata.debugfs_dir) { > + if (IS_ERR_OR_NULL(pdrvdata.debugfs_dir)) { > pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > PTR_ERR...
2013 Jul 19
4
[patch] virtio: console: fix error handling for debugfs_create_dir()
...ed. Arnd > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 1b456fe..ad2cd6d 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -2215,7 +2215,7 @@ static int __init init(void) > } > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > - if (!pdrvdata.debugfs_dir) { > + if (IS_ERR_OR_NULL(pdrvdata.debugfs_dir)) { > pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > PTR_ERR...
2012 Dec 20
1
[PATCH] virtio_console: correct error message on failure of debugfs_create_dir
...| 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index c594cb1..490b70e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2212,10 +2212,9 @@ static int __init init(void) } pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); - if (!pdrvdata.debugfs_dir) { - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", - PTR_ERR(pdrvdata.debugfs_dir)); - } + if (!pdrvdata.debugfs_dir) + pr_warn("Error creating debugfs dir for virti...
2012 Dec 20
1
[PATCH] virtio_console: correct error message on failure of debugfs_create_dir
...| 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index c594cb1..490b70e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2212,10 +2212,9 @@ static int __init init(void) } pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); - if (!pdrvdata.debugfs_dir) { - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", - PTR_ERR(pdrvdata.debugfs_dir)); - } + if (!pdrvdata.debugfs_dir) + pr_warn("Error creating debugfs dir for virti...
2013 Jul 29
2
[patch v2] virtio: console: cleanup an error message
...letely different > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 1b456fe..4cf46d8 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -2215,10 +2215,8 @@ static int __init init(void) > } > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > - if (!pdrvdata.debugfs_dir) { > - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > - PTR_ERR(pdrvdata.debugfs_dir)); > - } > + if (!pdrvdata.debugfs_dir) > + pr_warning("Err...
2013 Jul 29
2
[patch v2] virtio: console: cleanup an error message
...letely different > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 1b456fe..4cf46d8 100644 > --- a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -2215,10 +2215,8 @@ static int __init init(void) > } > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > - if (!pdrvdata.debugfs_dir) { > - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > - PTR_ERR(pdrvdata.debugfs_dir)); > - } > + if (!pdrvdata.debugfs_dir) > + pr_warning("Err...
2014 Jun 29
2
[PATCH 1/1] virtio: console: remove unnecessary null test before debugfs_remove_recursive
...f --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 60aafb8..b585b47 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2262,8 +2262,7 @@ static int __init init(void) unregister: unregister_virtio_driver(&virtio_console); free: - if (pdrvdata.debugfs_dir) - debugfs_remove_recursive(pdrvdata.debugfs_dir); + debugfs_remove_recursive(pdrvdata.debugfs_dir); class_destroy(pdrvdata.class); return err; } @@ -2276,8 +2275,7 @@ static void __exit fini(void) unregister_virtio_driver(&virtio_rproc_serial); class_destroy(pdrvdata.cl...
2014 Jun 29
2
[PATCH 1/1] virtio: console: remove unnecessary null test before debugfs_remove_recursive
...f --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 60aafb8..b585b47 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2262,8 +2262,7 @@ static int __init init(void) unregister: unregister_virtio_driver(&virtio_console); free: - if (pdrvdata.debugfs_dir) - debugfs_remove_recursive(pdrvdata.debugfs_dir); + debugfs_remove_recursive(pdrvdata.debugfs_dir); class_destroy(pdrvdata.class); return err; } @@ -2276,8 +2275,7 @@ static void __exit fini(void) unregister_virtio_driver(&virtio_rproc_serial); class_destroy(pdrvdata.cl...
2013 Jul 29
1
[patch v2] virtio: console: cleanup an error message
...b/drivers/char/virtio_console.c > > > index 1b456fe..4cf46d8 100644 > > > --- a/drivers/char/virtio_console.c > > > +++ b/drivers/char/virtio_console.c > > > @@ -2215,10 +2215,8 @@ static int __init init(void) > > > } > > > > > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > > > - if (!pdrvdata.debugfs_dir) { > > > - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > > > - PTR_ERR(pdrvdata.debugfs_dir)); > > > - } > > > + if (!...
2013 Jul 29
1
[patch v2] virtio: console: cleanup an error message
...b/drivers/char/virtio_console.c > > > index 1b456fe..4cf46d8 100644 > > > --- a/drivers/char/virtio_console.c > > > +++ b/drivers/char/virtio_console.c > > > @@ -2215,10 +2215,8 @@ static int __init init(void) > > > } > > > > > > pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); > > > - if (!pdrvdata.debugfs_dir) { > > > - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", > > > - PTR_ERR(pdrvdata.debugfs_dir)); > > > - } > > > + if (!...
2013 Jul 22
0
[patch v2] virtio: console: cleanup an error message
...;dan.carpenter at oracle.com> --- v2: completely different diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 1b456fe..4cf46d8 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2215,10 +2215,8 @@ static int __init init(void) } pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); - if (!pdrvdata.debugfs_dir) { - pr_warning("Error %ld creating debugfs dir for virtio-ports\n", - PTR_ERR(pdrvdata.debugfs_dir)); - } + if (!pdrvdata.debugfs_dir) + pr_warning("Error creating debugfs dir for vi...
2013 Jan 17
1
[RFC] virtio_console: Add DRIVER and INTERFACE to uevent.
...->parent->parent ? + dev_name(dev->parent->parent) : "", + dev->parent ? dev_name(dev->parent) : "", + dev_name(dev)); +} + static int __init init(void) { int err; @@ -2201,6 +2222,7 @@ static int __init init(void) return err; } + pdrvdata.class->dev_uevent = class_virtio_ports_uevent; pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); if (!pdrvdata.debugfs_dir) { pr_warning("Error %ld creating debugfs dir for virtio-ports\n", -- 1.7.5.4
2013 Jan 17
1
[RFC] virtio_console: Add DRIVER and INTERFACE to uevent.
...->parent->parent ? + dev_name(dev->parent->parent) : "", + dev->parent ? dev_name(dev->parent) : "", + dev_name(dev)); +} + static int __init init(void) { int err; @@ -2201,6 +2222,7 @@ static int __init init(void) return err; } + pdrvdata.class->dev_uevent = class_virtio_ports_uevent; pdrvdata.debugfs_dir = debugfs_create_dir("virtio-ports", NULL); if (!pdrvdata.debugfs_dir) { pr_warning("Error %ld creating debugfs dir for virtio-ports\n", -- 1.7.5.4
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...onsole(port); if (err) goto free_inbufs; @@ -1234,7 +1306,7 @@ static int add_port(struct ports_device *portdev, u32 id) free_inbufs: while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); free_device: device_destroy(pdrvdata.class, port->dev->devt); free_cdev: @@ -1276,7 +1348,17 @@ static void remove_port_data(struct port *port) /* Remove buffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, P...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...onsole(port); if (err) goto free_inbufs; @@ -1234,7 +1306,7 @@ static int add_port(struct ports_device *portdev, u32 id) free_inbufs: while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); free_device: device_destroy(pdrvdata.class, port->dev->devt); free_cdev: @@ -1276,7 +1348,17 @@ static void remove_port_data(struct port *port) /* Remove buffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) - free_buf(buf); + free_buf(port->in_vq, buf, P...
2013 Jan 17
4
[PATCH] virtio_console: Use virtio device index to generate port name
...vqs; - /* Used for numbering devices for sysfs and debugfs */ - unsigned int drv_index; - /* Major number for this device. Ports will be created as minors. */ int chr_major; }; @@ -1415,7 +1409,7 @@ static int add_port(struct ports_device *portdev, u32 id) } port->dev = device_create(pdrvdata.class, &port->portdev->vdev->dev, devt, port, "vport%up%u", - port->portdev->drv_index, id); + port->portdev->vdev->index, id); if (IS_ERR(port->dev)) { err = PTR_ERR(port->dev); dev_err(&port->portdev->vdev->dev, @@...
2013 Jan 17
4
[PATCH] virtio_console: Use virtio device index to generate port name
...vqs; - /* Used for numbering devices for sysfs and debugfs */ - unsigned int drv_index; - /* Major number for this device. Ports will be created as minors. */ int chr_major; }; @@ -1415,7 +1409,7 @@ static int add_port(struct ports_device *portdev, u32 id) } port->dev = device_create(pdrvdata.class, &port->portdev->vdev->dev, devt, port, "vport%up%u", - port->portdev->drv_index, id); + port->portdev->vdev->index, id); if (IS_ERR(port->dev)) { err = PTR_ERR(port->dev); dev_err(&port->portdev->vdev->dev, @@...
2013 Jul 19
2
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref) > > port = container_of(kref, struct port, kref); > > - sysfs_remove_group(&port->dev->kobj, &port_attribute_group); > - device_destroy(pdrvdata.class, port->dev->devt); > - cdev_del(port->cdev); > - > - kfree(port->name); > - > - debugfs_remove(port->debugfs_file); > - > kfree(port); > } > > @@ -1566,6 +1558,14 @@ static void unplug_port(struct port *port) > */ > port->portdev...