patch-2.4.23 linux-2.4.23/drivers/ide/ide-default.c

Next file: linux-2.4.23/drivers/ide/ide-disk.c
Previous file: linux-2.4.23/drivers/ide/ide-cd.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/ide/ide-default.c linux-2.4.23/drivers/ide/ide-default.c
@@ -40,6 +40,21 @@
 {
 }
 
+static int idedefault_open(struct inode *inode, struct file *filp, ide_drive_t *drive)
+{
+	MOD_INC_USE_COUNT;
+	if(filp->f_flags & O_NDELAY)
+		return 0;
+	MOD_DEC_USE_COUNT;
+	drive->usage--;
+	return -ENXIO;
+}
+
+static void idedefault_release(struct inode *inode, struct file *filp, ide_drive_t *drive)
+{
+	MOD_DEC_USE_COUNT;
+}
+
 int idedefault_init (void);
 int idedefault_attach(ide_drive_t *drive);
 
@@ -56,6 +71,8 @@
 	supports_dsc_overlap:	0,
 	init:			idedefault_init,
 	attach:			idedefault_attach,
+	open:			idedefault_open,
+	release:		idedefault_release
 };
 
 static ide_module_t idedefault_module = {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)