diff options
author | jidong xiao <jidong.xiao@gmail.com> | 2007-09-13 12:08:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:27 -0400 |
commit | 403fae78d7388876b96fbe30ccf2cb551c49ae5a (patch) | |
tree | 49b1dd0cfd74f676bca9c4273de320ca137e2444 /drivers/usb | |
parent | ed6590a861a16276db34ee626375fa79f3369ac3 (diff) |
USB: fix limited_power setting mistake in hub.c
This patch (jx001) fixes a variable assignment mistake in hub driver.
limited_power should be set to 0 if the hub is self-powered,and 1 if
the hub is bus-powered.
However, the effect of the code was exactly opposite to the spec's
statement for the Local Power Source field. The spec says, this field
is 1 meaning Local power supply lost while this field is 0 indicating
Local power supply good.(This statement is very confusing.)
So this patch switchs the 0 and 1.
Signed-off-by: Jason Xiao <jidong.xiao@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hub.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 691acf2223c2..481dca641ea2 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -2818,9 +2818,9 @@ static void hub_events(void) | |||
2818 | clear_hub_feature(hdev, C_HUB_LOCAL_POWER); | 2818 | clear_hub_feature(hdev, C_HUB_LOCAL_POWER); |
2819 | if (hubstatus & HUB_STATUS_LOCAL_POWER) | 2819 | if (hubstatus & HUB_STATUS_LOCAL_POWER) |
2820 | /* FIXME: Is this always true? */ | 2820 | /* FIXME: Is this always true? */ |
2821 | hub->limited_power = 0; | ||
2822 | else | ||
2823 | hub->limited_power = 1; | 2821 | hub->limited_power = 1; |
2822 | else | ||
2823 | hub->limited_power = 0; | ||
2824 | } | 2824 | } |
2825 | if (hubchange & HUB_CHANGE_OVERCURRENT) { | 2825 | if (hubchange & HUB_CHANGE_OVERCURRENT) { |
2826 | dev_dbg (hub_dev, "overcurrent change\n"); | 2826 | dev_dbg (hub_dev, "overcurrent change\n"); |