aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-19 15:13:45 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-19 15:13:45 -0400
commit23b6b0e3e8306ce3d00e0c87196bfaad335b9096 (patch)
tree3e690e564ac42444937b0d66b624c0e292d4a88a /drivers
parent8624a1c93772d24a38ed10cfcd290e8a18ac5b0a (diff)
parent47a5c6fa0e204a2b63309c648bb2fde36836c826 (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'drivers')
-rw-r--r--drivers/atm/he.c9
-rw-r--r--drivers/sbus/char/openprom.c13
-rw-r--r--drivers/serial/s3c2410.c2
3 files changed, 20 insertions, 4 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index d369130f4235..dd96123a2b7f 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -2282,6 +2282,8 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
2282 TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H))); 2282 TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H)));
2283 2283
2284 if (new_tail == he_dev->tpdrq_head) { 2284 if (new_tail == he_dev->tpdrq_head) {
2285 int slot;
2286
2285 hprintk("tpdrq full (cid 0x%x)\n", cid); 2287 hprintk("tpdrq full (cid 0x%x)\n", cid);
2286 /* 2288 /*
2287 * FIXME 2289 * FIXME
@@ -2289,6 +2291,13 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
2289 * after service_tbrq, service the backlog 2291 * after service_tbrq, service the backlog
2290 * for now, we just drop the pdu 2292 * for now, we just drop the pdu
2291 */ 2293 */
2294 for (slot = 0; slot < TPD_MAXIOV; ++slot) {
2295 if (tpd->iovec[slot].addr)
2296 pci_unmap_single(he_dev->pci_dev,
2297 tpd->iovec[slot].addr,
2298 tpd->iovec[slot].len & TPD_LEN_MASK,
2299 PCI_DMA_TODEVICE);
2300 }
2292 if (tpd->skb) { 2301 if (tpd->skb) {
2293 if (tpd->vcc->pop) 2302 if (tpd->vcc->pop)
2294 tpd->vcc->pop(tpd->vcc, tpd->skb); 2303 tpd->vcc->pop(tpd->vcc, tpd->skb);
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 293bb2fdb1d5..2f698763ba5d 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -145,8 +145,9 @@ static int opromgetprop(void __user *argp, struct device_node *dp, struct openpr
145 void *pval; 145 void *pval;
146 int len; 146 int len;
147 147
148 pval = of_get_property(dp, op->oprom_array, &len); 148 if (!dp ||
149 if (!pval || len <= 0 || len > bufsize) 149 !(pval = of_get_property(dp, op->oprom_array, &len)) ||
150 len <= 0 || len > bufsize)
150 return copyout(argp, op, sizeof(int)); 151 return copyout(argp, op, sizeof(int));
151 152
152 memcpy(op->oprom_array, pval, len); 153 memcpy(op->oprom_array, pval, len);
@@ -161,6 +162,8 @@ static int opromnxtprop(void __user *argp, struct device_node *dp, struct openpr
161 struct property *prop; 162 struct property *prop;
162 int len; 163 int len;
163 164
165 if (!dp)
166 return copyout(argp, op, sizeof(int));
164 if (op->oprom_array[0] == '\0') { 167 if (op->oprom_array[0] == '\0') {
165 prop = dp->properties; 168 prop = dp->properties;
166 if (!prop) 169 if (!prop)
@@ -266,9 +269,13 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp
266 269
267static int oprompath2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data) 270static int oprompath2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data)
268{ 271{
272 phandle ph = 0;
273
269 dp = of_find_node_by_path(op->oprom_array); 274 dp = of_find_node_by_path(op->oprom_array);
275 if (dp)
276 ph = dp->node;
270 data->current_node = dp; 277 data->current_node = dp;
271 *((int *)op->oprom_array) = dp->node; 278 *((int *)op->oprom_array) = ph;
272 op->oprom_size = sizeof(int); 279 op->oprom_size = sizeof(int);
273 280
274 return copyout(argp, op, bufsize + sizeof(int)); 281 return copyout(argp, op, bufsize + sizeof(int));
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 392bffcf96e8..95738a19cde7 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1621,7 +1621,7 @@ static struct s3c24xx_uart_info s3c2412_uart_inf = {
1621static int s3c2412_serial_probe(struct platform_device *dev) 1621static int s3c2412_serial_probe(struct platform_device *dev)
1622{ 1622{
1623 dbg("s3c2440_serial_probe: dev=%p\n", dev); 1623 dbg("s3c2440_serial_probe: dev=%p\n", dev);
1624 return s3c24xx_serial_probe(dev, &s3c2440_uart_inf); 1624 return s3c24xx_serial_probe(dev, &s3c2412_uart_inf);
1625} 1625}
1626 1626
1627static struct platform_driver s3c2412_serial_drv = { 1627static struct platform_driver s3c2412_serial_drv = {