diff options
author | David S. Miller <davem@davemloft.net> | 2015-12-17 22:08:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-17 22:08:28 -0500 |
commit | b3e0d3d7bab14f2544a3314bec53a23dc7dd2206 (patch) | |
tree | 2bd3c1c1d128e0c362655fa70a6eea02fc856f62 /drivers/isdn | |
parent | 3268e5cb494d8778a5a67a9fa2b1bdb0243b77ad (diff) | |
parent | 73796d8bf27372e26c2b79881947304c14c2d353 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/geneve.c
Here we had an overlapping change, where in 'net' the extraneous stats
bump was being removed whilst in 'net-next' the final argument to
udp_tunnel6_xmit_skb() was being changed.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/gigaset/ser-gigaset.c | 23 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/mISDNipac.c | 7 |
2 files changed, 14 insertions, 16 deletions
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index 375be509e95f..2a506fe0c8a4 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c | |||
@@ -67,8 +67,7 @@ static int write_modem(struct cardstate *cs) | |||
67 | struct sk_buff *skb = bcs->tx_skb; | 67 | struct sk_buff *skb = bcs->tx_skb; |
68 | int sent = -EOPNOTSUPP; | 68 | int sent = -EOPNOTSUPP; |
69 | 69 | ||
70 | if (!tty || !tty->driver || !skb) | 70 | WARN_ON(!tty || !tty->ops || !skb); |
71 | return -EINVAL; | ||
72 | 71 | ||
73 | if (!skb->len) { | 72 | if (!skb->len) { |
74 | dev_kfree_skb_any(skb); | 73 | dev_kfree_skb_any(skb); |
@@ -109,8 +108,7 @@ static int send_cb(struct cardstate *cs) | |||
109 | unsigned long flags; | 108 | unsigned long flags; |
110 | int sent = 0; | 109 | int sent = 0; |
111 | 110 | ||
112 | if (!tty || !tty->driver) | 111 | WARN_ON(!tty || !tty->ops); |
113 | return -EFAULT; | ||
114 | 112 | ||
115 | cb = cs->cmdbuf; | 113 | cb = cs->cmdbuf; |
116 | if (!cb) | 114 | if (!cb) |
@@ -370,19 +368,18 @@ static void gigaset_freecshw(struct cardstate *cs) | |||
370 | tasklet_kill(&cs->write_tasklet); | 368 | tasklet_kill(&cs->write_tasklet); |
371 | if (!cs->hw.ser) | 369 | if (!cs->hw.ser) |
372 | return; | 370 | return; |
373 | dev_set_drvdata(&cs->hw.ser->dev.dev, NULL); | ||
374 | platform_device_unregister(&cs->hw.ser->dev); | 371 | platform_device_unregister(&cs->hw.ser->dev); |
375 | kfree(cs->hw.ser); | ||
376 | cs->hw.ser = NULL; | ||
377 | } | 372 | } |
378 | 373 | ||
379 | static void gigaset_device_release(struct device *dev) | 374 | static void gigaset_device_release(struct device *dev) |
380 | { | 375 | { |
381 | struct platform_device *pdev = to_platform_device(dev); | 376 | struct cardstate *cs = dev_get_drvdata(dev); |
382 | 377 | ||
383 | /* adapted from platform_device_release() in drivers/base/platform.c */ | 378 | if (!cs) |
384 | kfree(dev->platform_data); | 379 | return; |
385 | kfree(pdev->resource); | 380 | dev_set_drvdata(dev, NULL); |
381 | kfree(cs->hw.ser); | ||
382 | cs->hw.ser = NULL; | ||
386 | } | 383 | } |
387 | 384 | ||
388 | /* | 385 | /* |
@@ -432,7 +429,9 @@ static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state, | |||
432 | struct tty_struct *tty = cs->hw.ser->tty; | 429 | struct tty_struct *tty = cs->hw.ser->tty; |
433 | unsigned int set, clear; | 430 | unsigned int set, clear; |
434 | 431 | ||
435 | if (!tty || !tty->driver || !tty->ops->tiocmset) | 432 | WARN_ON(!tty || !tty->ops); |
433 | /* tiocmset is an optional tty driver method */ | ||
434 | if (!tty->ops->tiocmset) | ||
436 | return -EINVAL; | 435 | return -EINVAL; |
437 | set = new_state & ~old_state; | 436 | set = new_state & ~old_state; |
438 | clear = old_state & ~new_state; | 437 | clear = old_state & ~new_state; |
diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c index a77eea594b69..cb428b9ee441 100644 --- a/drivers/isdn/hardware/mISDN/mISDNipac.c +++ b/drivers/isdn/hardware/mISDN/mISDNipac.c | |||
@@ -1170,7 +1170,7 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) | |||
1170 | 1170 | ||
1171 | if (ipac->type & IPAC_TYPE_IPACX) { | 1171 | if (ipac->type & IPAC_TYPE_IPACX) { |
1172 | ista = ReadIPAC(ipac, ISACX_ISTA); | 1172 | ista = ReadIPAC(ipac, ISACX_ISTA); |
1173 | while (ista && cnt--) { | 1173 | while (ista && --cnt) { |
1174 | pr_debug("%s: ISTA %02x\n", ipac->name, ista); | 1174 | pr_debug("%s: ISTA %02x\n", ipac->name, ista); |
1175 | if (ista & IPACX__ICA) | 1175 | if (ista & IPACX__ICA) |
1176 | ipac_irq(&ipac->hscx[0], ista); | 1176 | ipac_irq(&ipac->hscx[0], ista); |
@@ -1182,7 +1182,7 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) | |||
1182 | } | 1182 | } |
1183 | } else if (ipac->type & IPAC_TYPE_IPAC) { | 1183 | } else if (ipac->type & IPAC_TYPE_IPAC) { |
1184 | ista = ReadIPAC(ipac, IPAC_ISTA); | 1184 | ista = ReadIPAC(ipac, IPAC_ISTA); |
1185 | while (ista && cnt--) { | 1185 | while (ista && --cnt) { |
1186 | pr_debug("%s: ISTA %02x\n", ipac->name, ista); | 1186 | pr_debug("%s: ISTA %02x\n", ipac->name, ista); |
1187 | if (ista & (IPAC__ICD | IPAC__EXD)) { | 1187 | if (ista & (IPAC__ICD | IPAC__EXD)) { |
1188 | istad = ReadISAC(isac, ISAC_ISTA); | 1188 | istad = ReadISAC(isac, ISAC_ISTA); |
@@ -1200,7 +1200,7 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) | |||
1200 | ista = ReadIPAC(ipac, IPAC_ISTA); | 1200 | ista = ReadIPAC(ipac, IPAC_ISTA); |
1201 | } | 1201 | } |
1202 | } else if (ipac->type & IPAC_TYPE_HSCX) { | 1202 | } else if (ipac->type & IPAC_TYPE_HSCX) { |
1203 | while (cnt) { | 1203 | while (--cnt) { |
1204 | ista = ReadIPAC(ipac, IPAC_ISTAB + ipac->hscx[1].off); | 1204 | ista = ReadIPAC(ipac, IPAC_ISTAB + ipac->hscx[1].off); |
1205 | pr_debug("%s: B2 ISTA %02x\n", ipac->name, ista); | 1205 | pr_debug("%s: B2 ISTA %02x\n", ipac->name, ista); |
1206 | if (ista) | 1206 | if (ista) |
@@ -1211,7 +1211,6 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) | |||
1211 | mISDNisac_irq(isac, istad); | 1211 | mISDNisac_irq(isac, istad); |
1212 | if (0 == (ista | istad)) | 1212 | if (0 == (ista | istad)) |
1213 | break; | 1213 | break; |
1214 | cnt--; | ||
1215 | } | 1214 | } |
1216 | } | 1215 | } |
1217 | if (cnt > maxloop) /* only for ISAC/HSCX without PCI IRQ test */ | 1216 | if (cnt > maxloop) /* only for ISAC/HSCX without PCI IRQ test */ |