sound: usb: Enable autosuspend for usb audio device

This allows runtime suspend to kick in upon all the
children of usb device are suspended. It saves power
when usb audio device is connected but not data transfer
is taking place.

CRs-Fixed: 1003807
Change-Id: I227a74c029f10ffda9ceccc10322ad71e7fd0435
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
Hemant Kumar 2016-04-01 19:13:01 -07:00 committed by Gerrit - the friendly Code Review server
parent cc915a3931
commit 6373b35536

View file

@ -643,6 +643,7 @@ static int usb_audio_probe(struct usb_interface *intf,
usb_chip[chip->index] = chip; usb_chip[chip->index] = chip;
chip->num_interfaces++; chip->num_interfaces++;
usb_set_intfdata(intf, chip); usb_set_intfdata(intf, chip);
usb_enable_autosuspend(chip->dev);
atomic_dec(&chip->active); atomic_dec(&chip->active);
mutex_unlock(&register_mutex); mutex_unlock(&register_mutex);
return 0; return 0;