Commit 88ab8a84 authored by Xenofon Foukas's avatar Xenofon Foukas Committed by Greg Kroah-Hartman

Staging: comedi: Fix coding style issues in drivers.c

This patch fixes line over 80 characters warning issues found
in file drivers.c
Signed-off-by: default avatarXenofon Foukas <foukas.xenofon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent fd599985
...@@ -117,8 +117,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -117,8 +117,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
for (driv = comedi_drivers; driv; driv = driv->next) { for (driv = comedi_drivers; driv; driv = driv->next) {
if (!try_module_get(driv->module)) { if (!try_module_get(driv->module)) {
printk printk(KERN_INFO "comedi: failed to increment module count, skipping\n");
(KERN_INFO "comedi: failed to increment module count, skipping\n");
continue; continue;
} }
if (driv->num_names) { if (driv->num_names) {
...@@ -205,9 +204,8 @@ int comedi_driver_unregister(struct comedi_driver *driver) ...@@ -205,9 +204,8 @@ int comedi_driver_unregister(struct comedi_driver *driver)
mutex_lock(&dev->mutex); mutex_lock(&dev->mutex);
if (dev->attached && dev->driver == driver) { if (dev->attached && dev->driver == driver) {
if (dev->use_count) if (dev->use_count)
printk printk(KERN_WARNING "BUG! detaching device with use_count=%d\n",
(KERN_WARNING "BUG! detaching device with use_count=%d\n", dev->use_count);
dev->use_count);
comedi_device_detach(dev); comedi_device_detach(dev);
} }
mutex_unlock(&dev->mutex); mutex_unlock(&dev->mutex);
...@@ -442,7 +440,9 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -442,7 +440,9 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned i; unsigned i;
for (i = 0; i < async->n_buf_pages; ++i) { for (i = 0; i < async->n_buf_pages; ++i) {
if (async->buf_page_list[i].virt_addr) { if (async->buf_page_list[i].virt_addr) {
clear_bit(PG_reserved, &(virt_to_page(async->buf_page_list[i].virt_addr)->flags)); clear_bit(PG_reserved,
&(virt_to_page(async->buf_page_list[i].
virt_addr)->flags));
if (s->async_dma_dir != DMA_NONE) { if (s->async_dma_dir != DMA_NONE) {
dma_free_coherent(dev->hw_dev, dma_free_coherent(dev->hw_dev,
PAGE_SIZE, PAGE_SIZE,
...@@ -494,8 +494,10 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -494,8 +494,10 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
break; break;
set_bit(PG_reserved, set_bit(PG_reserved,
&(virt_to_page(async->buf_page_list[i].virt_addr)->flags)); &(virt_to_page(async->buf_page_list[i].
pages[i] = virt_to_page(async->buf_page_list[i].virt_addr); virt_addr)->flags));
pages[i] = virt_to_page(async->buf_page_list[i].
virt_addr);
} }
} }
if (i == n_pages) { if (i == n_pages) {
...@@ -512,7 +514,10 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s, ...@@ -512,7 +514,10 @@ int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
NULL) { NULL) {
break; break;
} }
clear_bit(PG_reserved, &(virt_to_page(async->buf_page_list[i].virt_addr)->flags)); clear_bit(PG_reserved,
&(virt_to_page(async->
buf_page_list[i].
virt_addr)->flags));
if (s->async_dma_dir != DMA_NONE) { if (s->async_dma_dir != DMA_NONE) {
dma_free_coherent(dev->hw_dev, dma_free_coherent(dev->hw_dev,
PAGE_SIZE, PAGE_SIZE,
...@@ -644,8 +649,7 @@ unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes) ...@@ -644,8 +649,7 @@ unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes)
{ {
if ((int)(async->buf_write_count + nbytes - if ((int)(async->buf_write_count + nbytes -
async->buf_write_alloc_count) > 0) { async->buf_write_alloc_count) > 0) {
printk printk(KERN_INFO "comedi: attempted to write-free more bytes than have been write-allocated.\n");
(KERN_INFO "comedi: attempted to write-free more bytes than have been write-allocated.\n");
nbytes = async->buf_write_alloc_count - async->buf_write_count; nbytes = async->buf_write_alloc_count - async->buf_write_count;
} }
async->buf_write_count += nbytes; async->buf_write_count += nbytes;
......
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