staging: comedi: change device used in dev_...() calls
authorIan Abbott <abbotti@mev.co.uk>
Mon, 18 Jun 2012 13:05:34 +0000 (14:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jun 2012 00:13:06 +0000 (17:13 -0700)
commitf41ad6675f2d5705a0fc1e210af8eb4a27dbacb4
tree3d4eba82cadb7f74c3d6528452e7396e487c99c5
parent4ea418b8b2fa8a70d0fcc8231b65e67b3a72984b
staging: comedi: change device used in dev_...() calls

A previous set of patches by Ravishankar Karkala Mallikarjunayya
replaced a load of printk() calls with dev_info(), dev_err(), etc.
Unfortunately, these used the 'struct device *hw_dev' member of 'struct
comedi_device') as the first parameter of these dev_...() calls, but
that pointer is usually NULL, so the kernel log messages come out a bit
wrong (they contain the phrase "(NULL device *)").

Use the 'struct device *class_dev' member of 'struct comedi_device'
instead for these dev_...() calls.  It will be non-NULL and somewhat
meaningful to users.  It's also consistent with those comedi drivers
that already use the class_dev member in their dev_...() calls.

Some of the messages included the format "comedi%d" with the minor
device number used for the "%d".  This is now redundant as it will be
the same as the dev_name() part of the kernel log message produced by
the dev_...() calls.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 files changed:
drivers/staging/comedi/drivers/adv_pci1710.c
drivers/staging/comedi/drivers/adv_pci_dio.c
drivers/staging/comedi/drivers/cb_das16_cs.c
drivers/staging/comedi/drivers/cb_pcidas.c
drivers/staging/comedi/drivers/cb_pcidas64.c
drivers/staging/comedi/drivers/cb_pcidda.c
drivers/staging/comedi/drivers/cb_pcidio.c
drivers/staging/comedi/drivers/cb_pcimdas.c
drivers/staging/comedi/drivers/contec_pci_dio.c
drivers/staging/comedi/drivers/daqboard2000.c
drivers/staging/comedi/drivers/das08_cs.c
drivers/staging/comedi/drivers/das1800.c
drivers/staging/comedi/drivers/das6402.c
drivers/staging/comedi/drivers/das800.c
drivers/staging/comedi/drivers/dt3000.c
drivers/staging/comedi/drivers/jr3_pci.c
drivers/staging/comedi/drivers/ni_pcimio.c
drivers/staging/comedi/drivers/pcl818.c
drivers/staging/comedi/drivers/pcmuio.c
drivers/staging/comedi/drivers/serial2002.c