Просмотр исходного кода

usb: Rename temp variable "config" to "val" in the set_avoid_reset_quirk()

In USB, the word "config" already has aseparate meaning. So it will
cause confusion if use "config" as variable's name for other purposes.
This patch is to convert the "config"  to "val"

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lan Tianyu 13 лет назад
Родитель
Сommit
7fc2cc320c
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      drivers/usb/core/sysfs.c

+ 3 - 3
drivers/usb/core/sysfs.c

@@ -204,12 +204,12 @@ set_avoid_reset_quirk(struct device *dev, struct device_attribute *attr,
 		const char *buf, size_t count)
 		const char *buf, size_t count)
 {
 {
 	struct usb_device	*udev = to_usb_device(dev);
 	struct usb_device	*udev = to_usb_device(dev);
-	int			config;
+	int			val;
 
 
-	if (sscanf(buf, "%d", &config) != 1 || config < 0 || config > 1)
+	if (sscanf(buf, "%d", &val) != 1 || val < 0 || val > 1)
 		return -EINVAL;
 		return -EINVAL;
 	usb_lock_device(udev);
 	usb_lock_device(udev);
-	if (config)
+	if (val)
 		udev->quirks |= USB_QUIRK_RESET_MORPHS;
 		udev->quirks |= USB_QUIRK_RESET_MORPHS;
 	else
 	else
 		udev->quirks &= ~USB_QUIRK_RESET_MORPHS;
 		udev->quirks &= ~USB_QUIRK_RESET_MORPHS;