staging: comedi: daqboard2000: add a dev_info message after attach
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 19 Sep 2012 01:49:46 +0000 (18:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2012 08:41:45 +0000 (09:41 +0100)
After a successful attach, output a simple dev_info message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/daqboard2000.c

index ff81829323fb186466e22956f7453d077c33f3a7..88037aea25ac7756f4bb347f1561d9e7ff8c0e2e 100644 (file)
@@ -762,8 +762,13 @@ static int daqboard2000_attach_pci(struct comedi_device *dev,
        s = &dev->subdevices[2];
        result = subdev_8255_init(dev, s, daqboard2000_8255_cb,
                        (unsigned long)(devpriv->daq + dioP2ExpansionIO8Bit));
+       if (result)
+               return result;
 
-       return result;
+       dev_info(dev->class_dev, "%s: %s attached\n",
+               dev->driver->driver_name, dev->board_name);
+
+       return 0;
 }
 
 static void daqboard2000_detach(struct comedi_device *dev)