aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/Makefile1
-rw-r--r--arch/um/drivers/line.c2
-rw-r--r--arch/um/drivers/ubd_kern.c19
3 files changed, 12 insertions, 10 deletions
diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
index d283e7b022a0..1d9b6ae967b0 100644
--- a/arch/um/drivers/Makefile
+++ b/arch/um/drivers/Makefile
@@ -62,5 +62,6 @@ obj-$(CONFIG_UML_RANDOM) += random.o
62 62
63# pcap_user.o must be added explicitly. 63# pcap_user.o must be added explicitly.
64USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o 64USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o
65CFLAGS_null.o = -DDEV_NULL=$(DEV_NULL_PATH)
65 66
66include arch/um/scripts/Makefile.rules 67include arch/um/scripts/Makefile.rules
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index d741f35d7b3a..14a102e877d6 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -275,6 +275,8 @@ int line_ioctl(struct tty_struct *tty, struct file * file,
275 case TIOCGLTC: 275 case TIOCGLTC:
276 case TIOCSLTC: 276 case TIOCSLTC:
277#endif 277#endif
278 /* Note: these are out of date as we now have TCGETS2 etc but this
279 whole lot should probably go away */
278 case TCGETS: 280 case TCGETS:
279 case TCSETSF: 281 case TCSETSF:
280 case TCSETSW: 282 case TCSETSW:
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index b58fb8941d8d..0a868118cf06 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -98,9 +98,9 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data)
98 98
99static DEFINE_MUTEX(ubd_lock); 99static DEFINE_MUTEX(ubd_lock);
100 100
101static int ubd_open(struct inode * inode, struct file * filp); 101static int ubd_open(struct block_device *bdev, fmode_t mode);
102static int ubd_release(struct inode * inode, struct file * file); 102static int ubd_release(struct gendisk *disk, fmode_t mode);
103static int ubd_ioctl(struct inode * inode, struct file * file, 103static int ubd_ioctl(struct block_device *bdev, fmode_t mode,
104 unsigned int cmd, unsigned long arg); 104 unsigned int cmd, unsigned long arg);
105static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo); 105static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo);
106 106
@@ -1112,9 +1112,9 @@ static int __init ubd_driver_init(void){
1112 1112
1113device_initcall(ubd_driver_init); 1113device_initcall(ubd_driver_init);
1114 1114
1115static int ubd_open(struct inode *inode, struct file *filp) 1115static int ubd_open(struct block_device *bdev, fmode_t mode)
1116{ 1116{
1117 struct gendisk *disk = inode->i_bdev->bd_disk; 1117 struct gendisk *disk = bdev->bd_disk;
1118 struct ubd *ubd_dev = disk->private_data; 1118 struct ubd *ubd_dev = disk->private_data;
1119 int err = 0; 1119 int err = 0;
1120 1120
@@ -1131,7 +1131,7 @@ static int ubd_open(struct inode *inode, struct file *filp)
1131 1131
1132 /* This should no more be needed. And it didn't work anyway to exclude 1132 /* This should no more be needed. And it didn't work anyway to exclude
1133 * read-write remounting of filesystems.*/ 1133 * read-write remounting of filesystems.*/
1134 /*if((filp->f_mode & FMODE_WRITE) && !ubd_dev->openflags.w){ 1134 /*if((mode & FMODE_WRITE) && !ubd_dev->openflags.w){
1135 if(--ubd_dev->count == 0) ubd_close_dev(ubd_dev); 1135 if(--ubd_dev->count == 0) ubd_close_dev(ubd_dev);
1136 err = -EROFS; 1136 err = -EROFS;
1137 }*/ 1137 }*/
@@ -1139,9 +1139,8 @@ static int ubd_open(struct inode *inode, struct file *filp)
1139 return err; 1139 return err;
1140} 1140}
1141 1141
1142static int ubd_release(struct inode * inode, struct file * file) 1142static int ubd_release(struct gendisk *disk, fmode_t mode)
1143{ 1143{
1144 struct gendisk *disk = inode->i_bdev->bd_disk;
1145 struct ubd *ubd_dev = disk->private_data; 1144 struct ubd *ubd_dev = disk->private_data;
1146 1145
1147 if(--ubd_dev->count == 0) 1146 if(--ubd_dev->count == 0)
@@ -1306,10 +1305,10 @@ static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
1306 return 0; 1305 return 0;
1307} 1306}
1308 1307
1309static int ubd_ioctl(struct inode * inode, struct file * file, 1308static int ubd_ioctl(struct block_device *bdev, fmode_t mode,
1310 unsigned int cmd, unsigned long arg) 1309 unsigned int cmd, unsigned long arg)
1311{ 1310{
1312 struct ubd *ubd_dev = inode->i_bdev->bd_disk->private_data; 1311 struct ubd *ubd_dev = bdev->bd_disk->private_data;
1313 struct hd_driveid ubd_id = { 1312 struct hd_driveid ubd_id = {
1314 .cyls = 0, 1313 .cyls = 0,
1315 .heads = 128, 1314 .heads = 128,