staging: dgap: get rid of brd->firstminor because it is 0
authorDaeseok Youn <daeseok.youn@gmail.com>
Fri, 13 Jun 2014 09:19:03 +0000 (18:19 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 22:23:31 +0000 (15:23 -0700)
firstminor in struct borad_t is always zero, so it
can be removed.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgap/dgap.c
drivers/staging/dgap/dgap.h

index c1f2798f4437bd8e9c39812e165ed7c4d3192fb4..352eb1b92db881046b60ff1f6e8901708d460973 100644 (file)
@@ -684,7 +684,6 @@ static int dgap_found_board(struct pci_dev *pdev, int id, int boardnum)
        /* store the info for the board we've found */
        brd->magic = DGAP_BOARD_MAGIC;
        brd->boardnum = boardnum;
-       brd->firstminor = 0;
        brd->vendor = dgap_pci_tbl[id].vendor;
        brd->device = dgap_pci_tbl[id].device;
        brd->pdev = pdev;
@@ -4168,8 +4167,8 @@ static int dgap_tty_register_ports(struct board_t *brd)
                struct device *classp;
 
                classp = tty_port_register_device(&brd->serial_ports[i],
-                                       brd->serial_driver,
-                                       brd->firstminor + i, NULL);
+                                                 brd->serial_driver,
+                                                 i, NULL);
 
                if (IS_ERR(classp)) {
                        ret = PTR_ERR(classp);
@@ -4180,8 +4179,8 @@ static int dgap_tty_register_ports(struct board_t *brd)
                ch->ch_tun.un_sysfs = classp;
 
                classp = tty_port_register_device(&brd->printer_ports[i],
-                                       brd->print_driver,
-                                       brd->firstminor + i, NULL);
+                                                 brd->print_driver,
+                                                 i, NULL);
 
                if (IS_ERR(classp)) {
                        ret = PTR_ERR(classp);
index 03c020e35f888846f376205e1253f71105f7dc86..c00b2e2ddc8d4154e65bc69adf452482ffaa8394 100644 (file)
@@ -529,7 +529,6 @@ struct macounter {
 struct board_t {
        int             magic;          /* Board Magic number.  */
        int             boardnum;       /* Board number: 0-3 */
-       int             firstminor;     /* First minor, e.g. 0, 30, 60 */
 
        int             type;           /* Type of board */
        char            *name;          /* Product Name */