diff options
Diffstat (limited to 'drivers/usb/misc/berry_charge.c')
-rw-r--r-- | drivers/usb/misc/berry_charge.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/misc/berry_charge.c b/drivers/usb/misc/berry_charge.c index 24e2dc3148a4..c05a85bc5925 100644 --- a/drivers/usb/misc/berry_charge.c +++ b/drivers/usb/misc/berry_charge.c | |||
@@ -123,6 +123,11 @@ static int berry_probe(struct usb_interface *intf, | |||
123 | { | 123 | { |
124 | struct usb_device *udev = interface_to_usbdev(intf); | 124 | struct usb_device *udev = interface_to_usbdev(intf); |
125 | 125 | ||
126 | if (udev->bus_mA < 500) { | ||
127 | dbg(&udev->dev, "Not enough power to charge available\n"); | ||
128 | return -ENODEV; | ||
129 | } | ||
130 | |||
126 | dbg(&udev->dev, "Power is set to %dmA\n", | 131 | dbg(&udev->dev, "Power is set to %dmA\n", |
127 | udev->actconfig->desc.bMaxPower * 2); | 132 | udev->actconfig->desc.bMaxPower * 2); |
128 | 133 | ||