lkml.org 
[lkml]   [2020]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver
Hi,

I just noticed that building this results in a compilation error, due
to a missing brace. I tested this patch, but with another patch on top
with debug logs, the other patch adds the brace.

I'll still hold off a bit before sending v2, for if others have
comments.

On Mon, Sep 14, 2020 at 11:27:49AM -0700, Matthias Kaehlcke wrote:

> diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c
> new file mode 100644
> index 000000000000..e5a816d0b124
> --- /dev/null
> +++ b/drivers/usb/misc/onboard_usb_hub.c
>
> +static int onboard_hub_suspend(struct platform_device *pdev, pm_message_t msg)
> +{
> + struct onboard_hub *hub = dev_get_drvdata(&pdev->dev);
> + int rc = 0;
> +
> + if (!hub->cfg.power_off_in_suspend)
> + return 0;
> +
> + hub->has_wakeup_capable_descendants = false;
> +
> + if (hub->cfg.wakeup_source) {
> + struct udev_node *node;
> +
> + mutex_lock(&hub->lock);
> +
> + list_for_each_entry(node, &hub->udev_list, list) {
> + if (usb_wakeup_enabled_descendants(node->udev)) {
> + hub->has_wakeup_capable_descendants = true;
> + break;

missing brace here: }

> + }
> +
> + mutex_unlock(&hub->lock);
> + }
> +
> + if (!hub->has_wakeup_capable_descendants)
> + rc = onboard_hub_power_off(hub);
> +
> + return rc;
> +}

\
 
 \ /
  Last update: 2020-09-14 21:53    [W:0.121 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site