aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dca/dca-sysfs.c15
-rw-r--r--drivers/net/wan/x25_asy.c5
2 files changed, 9 insertions, 11 deletions
diff --git a/drivers/dca/dca-sysfs.c b/drivers/dca/dca-sysfs.c
index 24a263b6844c..011328faa5f2 100644
--- a/drivers/dca/dca-sysfs.c
+++ b/drivers/dca/dca-sysfs.c
@@ -12,10 +12,10 @@ static spinlock_t dca_idr_lock;
12 12
13int dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot) 13int dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot)
14{ 14{
15 struct class_device *cd; 15 struct device *cd;
16 16
17 cd = class_device_create(dca_class, dca->cd, MKDEV(0, slot + 1), 17 cd = device_create(dca_class, dca->cd, MKDEV(0, slot + 1),
18 dev, "requester%d", slot); 18 "requester%d", slot);
19 if (IS_ERR(cd)) 19 if (IS_ERR(cd))
20 return PTR_ERR(cd); 20 return PTR_ERR(cd);
21 return 0; 21 return 0;
@@ -23,12 +23,12 @@ int dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot)
23 23
24void dca_sysfs_remove_req(struct dca_provider *dca, int slot) 24void dca_sysfs_remove_req(struct dca_provider *dca, int slot)
25{ 25{
26 class_device_destroy(dca_class, MKDEV(0, slot + 1)); 26 device_destroy(dca_class, MKDEV(0, slot + 1));
27} 27}
28 28
29int dca_sysfs_add_provider(struct dca_provider *dca, struct device *dev) 29int dca_sysfs_add_provider(struct dca_provider *dca, struct device *dev)
30{ 30{
31 struct class_device *cd; 31 struct device *cd;
32 int err = 0; 32 int err = 0;
33 33
34idr_try_again: 34idr_try_again:
@@ -46,8 +46,7 @@ idr_try_again:
46 return err; 46 return err;
47 } 47 }
48 48
49 cd = class_device_create(dca_class, NULL, MKDEV(0, 0), 49 cd = device_create(dca_class, dev, MKDEV(0, 0), "dca%d", dca->id);
50 dev, "dca%d", dca->id);
51 if (IS_ERR(cd)) { 50 if (IS_ERR(cd)) {
52 spin_lock(&dca_idr_lock); 51 spin_lock(&dca_idr_lock);
53 idr_remove(&dca_idr, dca->id); 52 idr_remove(&dca_idr, dca->id);
@@ -60,7 +59,7 @@ idr_try_again:
60 59
61void dca_sysfs_remove_provider(struct dca_provider *dca) 60void dca_sysfs_remove_provider(struct dca_provider *dca)
62{ 61{
63 class_device_unregister(dca->cd); 62 device_unregister(dca->cd);
64 dca->cd = NULL; 63 dca->cd = NULL;
65 spin_lock(&dca_idr_lock); 64 spin_lock(&dca_idr_lock);
66 idr_remove(&dca_idr, dca->id); 65 idr_remove(&dca_idr, dca->id);
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 1e89d4de1bb7..5e2d763c6b5f 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -554,6 +554,7 @@ static void x25_asy_receive_buf(struct tty_struct *tty, const unsigned char *cp,
554static int x25_asy_open_tty(struct tty_struct *tty) 554static int x25_asy_open_tty(struct tty_struct *tty)
555{ 555{
556 struct x25_asy *sl = (struct x25_asy *) tty->disc_data; 556 struct x25_asy *sl = (struct x25_asy *) tty->disc_data;
557 struct tty_ldisc *ld;
557 int err; 558 int err;
558 559
559 /* First make sure we're not already connected. */ 560 /* First make sure we're not already connected. */
@@ -572,9 +573,7 @@ static int x25_asy_open_tty(struct tty_struct *tty)
572 if (tty->driver->flush_buffer) { 573 if (tty->driver->flush_buffer) {
573 tty->driver->flush_buffer(tty); 574 tty->driver->flush_buffer(tty);
574 } 575 }
575 if (tty->ldisc.flush_buffer) { 576 tty_ldisc_flush(tty);
576 tty->ldisc.flush_buffer(tty);
577 }
578 577
579 /* Restore default settings */ 578 /* Restore default settings */
580 sl->dev->type = ARPHRD_X25; 579 sl->dev->type = ARPHRD_X25;