|
From: Peter K. <pk...@us...> - 2001-04-18 15:23:11
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.168 1.169=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Return 0 instead of 1 to indicate success in bt_ctrl_init().
* Return -EINVAL instead of 1 to indicate failure in bt_paranoia_check().
The diff of the modified file(s):
--- bluetooth.c 2001/04/18 14:45:21 1.168
+++ bluetooth.c 2001/04/18 15:23:09 1.169
@@ -137,7 +137,7 @@
#define BT_TTY_DRIVER_MAGIC 0xb100b100 /* check if free...*/
#define BT_TTY_MAJOR 124 /* Experimental use */
=20
-#define BT_PARANOIA_CHECK 1
+#define BT_PARANOIA_CHECK 0
=20
/****************** TYPE DEFINITION SECTION ******************************=
***/
=20
@@ -2358,7 +2358,7 @@
bt_ctrl.tty_last_unthrottled =3D 0;
bt_ctrl.ctrl_tty_count =3D 0;
=20
- return 1;
+ return 0;
}
=20=20
void bt_reset_session(s32 line)
@@ -2661,19 +2661,16 @@
static inline s32
bt_paranoia_check(struct tty_driver *bt_tty, kdev_t device, const u8 *rout=
ine)
{
-#ifdef BT_PARANOIA_CHECK
- static const u8 *badmagic =3D
- "Warning: bad magic number for bluetooth driver struct (%s) in %s\n";
- static const char *badinfo =3D
- "Warning: null tty_driver struct for (%s) in %s\n";
-
+#if BT_PARANOIA_CHECK
if (!bt_tty) {
- printk(badinfo, kdevname(device), routine);
- return 1;
+ printk("Warning: null tty_driver struct for (%s) in %s\n",
+ kdevname(device), routine);
+ return -EINVAL;
}
+
if (bt_tty->magic !=3D BT_TTY_DRIVER_MAGIC) {
- printk(badmagic, kdevname(device), routine);
- return 1;
+ printk("Warning: bad magic number for bluetooth driver struct (%s) in %s=
\n", kdevname(device), routine);
+ return -EINVAL;
}
#endif
return 0;
|