Staging: comedi: change printk to dev_err/dev_dbg in unioxx5.c
authorConrad Gomes <conrad.s.j.gomes@gmail.com>
Thu, 21 Nov 2013 19:57:54 +0000 (01:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Nov 2013 19:37:40 +0000 (11:37 -0800)
commit2851fcd52073b03e865128cad8161891094ecc02
tree9860bca94d9d0c81a6f7f3171d231ece2707889f
parent2e9cf8489bebc414fbaeee9496656edf6ab57f64
Staging: comedi: change printk to dev_err/dev_dbg in unioxx5.c

This is a patch which fixes coding style issues due to printk usage in
unioxx5.c found by checkpatch.pl in the following functions:
1) __unioxx5_digital_read
2) __unioxx5_analog_read
3) __unioxx5_digital_config

To subsitute printk with dev_err/dev_dbg, access to the struct device is
required. The function definitions of the above functions have been changed
to take the pointer to the struct comedi_subdevice as a parameter instead
of the pointer to struct unioxx5_subd_priv.

The pointers to the stuct device and the struct unioxx5_subd_priv are
obtained through the pointer to the struct comedi_subdevice in these functions.

The function calls of __unioxx5_digital_read and __unioxx5_analog_read in
unioxx5_subdev_read have been changed to pass the pointer to the struct
comedi_subdevice.

Signed-off-by: Conrad Gomes <conrad.s.j.gomes@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/unioxx5.c