]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: comedi: amplc_pci224: no need to comedi_set_hw_dev() here
authorIan Abbott <abbotti@mev.co.uk>
Thu, 31 Jul 2014 13:47:55 +0000 (14:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Aug 2014 19:23:09 +0000 (12:23 -0700)
The comedi core module calls `comedi_set_hw_dev()` to associate the
hardware `struct device` with the `struct comedi_device` before it calls
the comedi driver's "auto_attach" hook `pci224_auto_attach()`.  There is
no need for `pci224_auto_attach()` to call `comedi_set_hw_dev()` itself,
so remove the call.

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

index a01504ac04431a2f55f3a9293c159ddaafcc86f1..0b056cfd013645b0cb1f69a7011fd99ce147452c 100644 (file)
@@ -1084,8 +1084,6 @@ pci224_auto_attach(struct comedi_device *dev, unsigned long context_model)
        if (!devpriv)
                return -ENOMEM;
 
-       comedi_set_hw_dev(dev, &pci_dev->dev);
-
        ret = comedi_pci_enable(dev);
        if (ret)
                return ret;