]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
staging: dgnc: remove "vpd" board variable
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jan 2018 20:00:07 +0000 (21:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 14:02:56 +0000 (15:02 +0100)
It was only ever read from the device, and spit out to the kernel log
for no good reason.  So remove it, and the way it was read from the
device, and the now unused "board file" callback.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_cls.c
drivers/staging/dgnc/dgnc_driver.c
drivers/staging/dgnc/dgnc_driver.h

index bbb3673618a9a51bc731c70d704313adfab41b1b..7e6cbfe4e4ee10f66134952037ceaa50b966418f 100644 (file)
@@ -1114,30 +1114,6 @@ static void cls_send_immediate_char(struct channel_t *ch, unsigned char c)
        writeb(c, &ch->ch_cls_uart->txrx);
 }
 
-static void cls_vpd(struct dgnc_board *brd)
-{
-       ulong           vpdbase;        /* Start of io base of the card */
-       u8 __iomem           *re_map_vpdbase;/* Remapped memory of the card */
-       int i = 0;
-
-       vpdbase = pci_resource_start(brd->pdev, 3);
-       if (!vpdbase)
-               return;
-
-       re_map_vpdbase = ioremap(vpdbase, 0x400);
-
-       if (!re_map_vpdbase)
-               return;
-
-       for (i = 0; i < 0x40; i++) {
-               brd->vpd[i] = readb(re_map_vpdbase + i);
-               pr_info("%x ", brd->vpd[i]);
-       }
-       pr_info("\n");
-
-       iounmap(re_map_vpdbase);
-}
-
 struct board_ops dgnc_cls_ops = {
        .tasklet =                      cls_tasklet,
        .intr =                         cls_intr,
@@ -1145,7 +1121,6 @@ struct board_ops dgnc_cls_ops = {
        .uart_off =                     cls_uart_off,
        .drain =                        cls_drain,
        .param =                        cls_param,
-       .vpd =                          cls_vpd,
        .assert_modem_signals =         cls_assert_modem_signals,
        .flush_uart_write =             cls_flush_uart_write,
        .flush_uart_read =              cls_flush_uart_read,
index 32f10bc50d4963694c5e618b74998a60da131d16..5d8c2d995dccebea55d96d9fa39ae067d2f78ddb 100644 (file)
@@ -142,9 +142,6 @@ static struct dgnc_board *dgnc_found_board(struct pci_dev *pdev, int id)
                if (rc < 0)
                        goto failed;
 
-               /* Get and store the board VPD, if it exists */
-               brd->bd_ops->vpd(brd);
-
                /*
                 * Enable Local Interrupt 1               (0x1),
                 * Local Interrupt 1 Polarity Active high (0x2),
index ac99cfd1b54b35475f3864fcdb7df992aae04695..3eb2f148b6185c905273aee26d9ffb9c409c55c7 100644 (file)
@@ -73,7 +73,6 @@ struct board_ops {
        void (*uart_off)(struct channel_t *ch);
        int  (*drain)(struct tty_struct *tty, uint seconds);
        void (*param)(struct tty_struct *tty);
-       void (*vpd)(struct dgnc_board *brd);
        void (*assert_modem_signals)(struct channel_t *ch);
        void (*flush_uart_write)(struct channel_t *ch);
        void (*flush_uart_read)(struct channel_t *ch);
@@ -95,7 +94,6 @@ struct board_ops {
  * @pdev: Pointer to the pci_dev structure.
  * @device: PCI device ID.
  * @maxports: Maximum ports this board can handle.
- * @vpd: VPD of this board, if found.
  * @bd_lock: Used to protect board.
  * @bd_intr_lock: Protect poller tasklet and interrupt routine from each other.
  * @state: State of the card.
@@ -122,7 +120,6 @@ struct dgnc_board {
        struct pci_dev  *pdev;
        u16             device;
        uint            maxports;
-       unsigned char   vpd[128];
 
        /* used to protect the board */
        spinlock_t      bd_lock;