Re: [ANNOUNCE]: version 2.00.3 megaraid driver for 2.4.x and 2.5.67

James Bottomley (James.Bottomley@steeleye.com)
17 Apr 2003 12:25:44 -0500


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-5717-1050600848-0001-2
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

OK, I think the attached patch fixes the try_module_get problem and also
sweeps up a compile warning issue I ran into on pa-risc.

Does this look OK to everyone?

James

--=_courier-5717-1050600848-0001-2
Content-Type: text/plain; name="tmp.diff"; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=tmp.diff

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher=
.
# This patch includes the following deltas:
# ChangeSet 1.1044 -> 1.1046=20
# drivers/scsi/megaraid.c 1.38 -> 1.40 =20
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/04/17 jejb@raven.il.steeleye.com 1.1045
# Fix megaraid compile warnings
# --------------------------------------------
# 03/04/17 jejb@raven.il.steeleye.com 1.1046
# Fix megaraid module ownership
#=20
# Move to using the .owner field of fops
# --------------------------------------------
#
diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
--- a/drivers/scsi/megaraid.c Thu Apr 17 12:23:35 2003
+++ b/drivers/scsi/megaraid.c Thu Apr 17 12:23:35 2003
@@ -34,6 +34,7 @@
#include <linux/fs.h>
#include <linux/blk.h>
#include <asm/uaccess.h>
+#include <asm/io.h>
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/module.h>
@@ -87,9 +88,9 @@
* The File Operations structure for the serial/ioctl interface of the dri=
ver
*/
static struct file_operations megadev_fops =3D {
+ .owner =3D THIS_MODULE,
.ioctl =3D megadev_ioctl,
.open =3D megadev_open,
- .release =3D megadev_close,
};
=20
/*
@@ -4039,9 +4040,6 @@
*/
if( !capable(CAP_SYS_ADMIN) ) return -EACCES;
=20
- if (!try_module_get(THIS_MODULE)) {
- return -ENXIO;
- }
return 0;
}
=20
@@ -4635,14 +4633,6 @@
}
}
=20
- return 0;
-}
-
-
-static int
-megadev_close (struct inode *inode, struct file *filep)
-{
- module_put(THIS_MODULE);
return 0;
}
=20

--=_courier-5717-1050600848-0001-2--