]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: Enable parport sb105x drivers if parport is configured
authorSteven Rostedt <rostedt@goodmis.org>
Fri, 14 Dec 2012 16:45:42 +0000 (11:45 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2013 17:32:46 +0000 (09:32 -0800)
Some of the drivers that the sb105x SystemBase handles are for parallel
port cards. If PARPORT isn't configured, the build fails. Only
initialize the parallel port cards if PARPORT is configured in.

Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sb105x/sb_pci_mp.c

index edb2a85b9d52512c41b161db44b5f74e93a44cd8..131afd0c460c3ba2f82f7beb68d11c75b59cbbaa 100644 (file)
@@ -3054,6 +3054,7 @@ static int init_mp_dev(struct pci_dev *pcidev, mppcibrd_t brd)
                                sbdev->nr_ports = ((portnum_hex/16)*10) + (portnum_hex % 16);
                        }
                        break;
+#ifdef CONFIG_PARPORT
                case PCI_DEVICE_ID_MP2S1P :
                        sbdev->nr_ports = 2;
 
@@ -3073,6 +3074,7 @@ static int init_mp_dev(struct pci_dev *pcidev, mppcibrd_t brd)
                        /* add PC compatible parallel port */
                        parport_pc_probe_port(pcidev->resource[2].start, pcidev->resource[3].start, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &pcidev->dev, 0);
                        break;
+#endif
        }
 
        ret = request_region(sbdev->uart_access_addr, (8*sbdev->nr_ports), sbdev->name);