mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
device: change device_usb logic
Allow PPPS function even if there is no device->usb callback. PPPS is useable even with no control interface. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
10
device.c
10
device.c
@@ -254,12 +254,10 @@ void device_print_status(struct device *device)
|
||||
|
||||
void device_usb(struct device *device, bool on)
|
||||
{
|
||||
if (device->usb) {
|
||||
if (device->ppps_path)
|
||||
ppps_power(device, on);
|
||||
else
|
||||
device->usb(device, on);
|
||||
}
|
||||
if (device->ppps_path)
|
||||
ppps_power(device, on);
|
||||
else if (device->usb)
|
||||
device->usb(device, on);
|
||||
}
|
||||
|
||||
int device_write(struct device *device, const void *buf, size_t len)
|
||||
|
||||
Reference in New Issue
Block a user