diff options
author | Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> | 2011-08-24 12:14:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-24 18:29:43 -0400 |
commit | d64bbeb57f9901b6919fabd1e5a555e94748c255 (patch) | |
tree | 1e5909ee703f5b6e0d8bf49cb3c98dffac59b0a7 /drivers/tty | |
parent | a16913a9b3b9fbb6c501eae005368064ddcc6351 (diff) |
jsm: remove remaining flip buffer code
The flip buffer is not used anymore. Remove its allocation and
declaration in the board structure.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/jsm/jsm.h | 3 | ||||
-rw-r--r-- | drivers/tty/serial/jsm/jsm_driver.c | 18 |
2 files changed, 0 insertions, 21 deletions
diff --git a/drivers/tty/serial/jsm/jsm.h b/drivers/tty/serial/jsm/jsm.h index b704c8ce0d71..cd53bdda77ce 100644 --- a/drivers/tty/serial/jsm/jsm.h +++ b/drivers/tty/serial/jsm/jsm.h | |||
@@ -88,7 +88,6 @@ enum { | |||
88 | 88 | ||
89 | /* 4 extra for alignment play space */ | 89 | /* 4 extra for alignment play space */ |
90 | #define WRITEBUFLEN ((4096) + 4) | 90 | #define WRITEBUFLEN ((4096) + 4) |
91 | #define MYFLIPLEN N_TTY_BUF_SIZE | ||
92 | 91 | ||
93 | #define JSM_VERSION "jsm: 1.2-1-INKERNEL" | 92 | #define JSM_VERSION "jsm: 1.2-1-INKERNEL" |
94 | #define JSM_PARTNUM "40002438_A-INKERNEL" | 93 | #define JSM_PARTNUM "40002438_A-INKERNEL" |
@@ -150,7 +149,6 @@ struct jsm_board | |||
150 | u32 bd_uart_offset; /* Space between each UART */ | 149 | u32 bd_uart_offset; /* Space between each UART */ |
151 | 150 | ||
152 | struct jsm_channel *channels[MAXPORTS]; /* array of pointers to our channels. */ | 151 | struct jsm_channel *channels[MAXPORTS]; /* array of pointers to our channels. */ |
153 | char *flipbuf; /* Our flip buffer, alloced if board is found */ | ||
154 | 152 | ||
155 | u32 bd_dividend; /* Board/UARTs specific dividend */ | 153 | u32 bd_dividend; /* Board/UARTs specific dividend */ |
156 | 154 | ||
@@ -177,7 +175,6 @@ struct jsm_board | |||
177 | #define CH_TX_FIFO_LWM 0x0800 /* TX Fifo is below Low Water */ | 175 | #define CH_TX_FIFO_LWM 0x0800 /* TX Fifo is below Low Water */ |
178 | #define CH_BREAK_SENDING 0x1000 /* Break is being sent */ | 176 | #define CH_BREAK_SENDING 0x1000 /* Break is being sent */ |
179 | #define CH_LOOPBACK 0x2000 /* Channel is in lookback mode */ | 177 | #define CH_LOOPBACK 0x2000 /* Channel is in lookback mode */ |
180 | #define CH_FLIPBUF_IN_USE 0x4000 /* Channel's flipbuf is in use */ | ||
181 | #define CH_BAUD0 0x08000 /* Used for checking B0 transitions */ | 178 | #define CH_BAUD0 0x08000 /* Used for checking B0 transitions */ |
182 | 179 | ||
183 | /* Our Read/Error/Write queue sizes */ | 180 | /* Our Read/Error/Write queue sizes */ |
diff --git a/drivers/tty/serial/jsm/jsm_driver.c b/drivers/tty/serial/jsm/jsm_driver.c index 96da17868cf3..1cc8cf602af8 100644 --- a/drivers/tty/serial/jsm/jsm_driver.c +++ b/drivers/tty/serial/jsm/jsm_driver.c | |||
@@ -160,27 +160,10 @@ static int __devinit jsm_probe_one(struct pci_dev *pdev, const struct pci_device | |||
160 | dev_info(&pdev->dev, "board %d: Digi Neo (rev %d), irq %d\n", | 160 | dev_info(&pdev->dev, "board %d: Digi Neo (rev %d), irq %d\n", |
161 | adapter_count, brd->rev, brd->irq); | 161 | adapter_count, brd->rev, brd->irq); |
162 | 162 | ||
163 | /* | ||
164 | * allocate flip buffer for board. | ||
165 | * | ||
166 | * Okay to malloc with GFP_KERNEL, we are not at interrupt | ||
167 | * context, and there are no locks held. | ||
168 | */ | ||
169 | brd->flipbuf = kzalloc(MYFLIPLEN, GFP_KERNEL); | ||
170 | if (!brd->flipbuf) { | ||
171 | /* XXX: leaking all resources from jsm_tty_init and | ||
172 | jsm_uart_port_init here! */ | ||
173 | dev_err(&pdev->dev, "memory allocation for flipbuf failed\n"); | ||
174 | rc = -ENOMEM; | ||
175 | goto out_free_uart; | ||
176 | } | ||
177 | |||
178 | pci_set_drvdata(pdev, brd); | 163 | pci_set_drvdata(pdev, brd); |
179 | pci_save_state(pdev); | 164 | pci_save_state(pdev); |
180 | 165 | ||
181 | return 0; | 166 | return 0; |
182 | out_free_uart: | ||
183 | jsm_remove_uart_port(brd); | ||
184 | out_free_irq: | 167 | out_free_irq: |
185 | jsm_remove_uart_port(brd); | 168 | jsm_remove_uart_port(brd); |
186 | free_irq(brd->irq, brd); | 169 | free_irq(brd->irq, brd); |
@@ -218,7 +201,6 @@ static void __devexit jsm_remove_one(struct pci_dev *pdev) | |||
218 | 201 | ||
219 | pci_release_regions(pdev); | 202 | pci_release_regions(pdev); |
220 | pci_disable_device(pdev); | 203 | pci_disable_device(pdev); |
221 | kfree(brd->flipbuf); | ||
222 | kfree(brd); | 204 | kfree(brd); |
223 | } | 205 | } |
224 | 206 | ||