[PATCH] usb-storage: don't call utsname()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch (as1100) replaces the core-kernel function call to utsname()
in usb-storage with the UTS_RELEASE macro.  It's used only for warning
about extra unusual_devs entries.

Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

---

Index: usb-2.6/drivers/usb/storage/usb.c
===================================================================
--- usb-2.6.orig/drivers/usb/storage/usb.c
+++ usb-2.6/drivers/usb/storage/usb.c
@@ -53,7 +53,7 @@
 #include <linux/slab.h>
 #include <linux/kthread.h>
 #include <linux/mutex.h>
-#include <linux/utsname.h>
+#include <linux/utsrelease.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
@@ -531,8 +531,8 @@ static int get_device_info(struct us_dat
 		if (msg >= 0 && !(us->fflags & US_FL_NEED_OVERRIDE))
 			printk(KERN_NOTICE USB_STORAGE "This device "
 				"(%04x,%04x,%04x S %02x P %02x)"
-				" has %s in unusual_devs.h (kernel"
-				" %s)\n"
+				" has %s in unusual_devs.h (kernel "
+				UTS_RELEASE ")\n"
 				"   Please send a copy of this message to "
 				"<linux-usb@xxxxxxxxxxxxxxx> and "
 				"<usb-storage@xxxxxxxxxxxxxxxxxxxxxxxx>\n",
@@ -541,8 +541,7 @@ static int get_device_info(struct us_dat
 				le16_to_cpu(ddesc->bcdDevice),
 				idesc->bInterfaceSubClass,
 				idesc->bInterfaceProtocol,
-				msgs[msg],
-				utsname()->release);
+				msgs[msg]);
 	}
 
 	return 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux