From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AE32C35642 for ; Fri, 21 Feb 2020 08:09:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 12C9D24681 for ; Fri, 21 Feb 2020 08:09:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582272569; bh=VoQBGjb/JsFJM3BKoLOX/WXeB1JAJ+3TWYgmREkaBvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=b+91SYTz7FA+J9zA+kQoHYKyA7NlzMYPNZx7bTQeBWgGpXnd/E9ts9XAuasuhDfmD JlC3JEkaeGpn81Xs68JG7/TVjIZdfb/r0O5ESoGlHDC+RxGld8aVp7ZNz6RbMlxvhw GFnoBuc0R7wosrNmvSD2AEdommIM3qf9wwNQY1fY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732355AbgBUIJ1 (ORCPT ); Fri, 21 Feb 2020 03:09:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:44256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732340AbgBUIJY (ORCPT ); Fri, 21 Feb 2020 03:09:24 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 172A520578; Fri, 21 Feb 2020 08:09:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582272564; bh=VoQBGjb/JsFJM3BKoLOX/WXeB1JAJ+3TWYgmREkaBvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kx1AxzVIDbUoqz27v758FoVA/gURGqy7dO9wF4Aow61K6ve7feMCVQU0hELq15ATY P8h2MH3QYqsSviXW8qNsa4E01yZPr4H/SZhtAqbcFQItnXfXD2SrTJDWOOgs7E0wCT 6guJDH2rfaqseiHPX/U1j0s4xztUoiB8vgEScMkA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Szyprowski , Dmitry Torokhov , Hans de Goede , Felipe Balbi , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.4 191/344] usb: dwc3: use proper initializers for property entries Date: Fri, 21 Feb 2020 08:39:50 +0100 Message-Id: <20200221072406.390732331@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072349.335551332@linuxfoundation.org> References: <20200221072349.335551332@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Torokhov [ Upstream commit 5eb5afb07853d6e90d3a2b230c825e028e948f79 ] We should not be reaching into property entries and initialize them by hand, but rather use proper initializer macros. This way we can alter internal representation of property entries with no visible changes to their users. Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Dmitry Torokhov Acked-by: Hans de Goede Acked-by: Felipe Balbi Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/usb/dwc3/host.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index 5567ed2cddbec..fa252870c926f 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -88,10 +88,10 @@ int dwc3_host_init(struct dwc3 *dwc) memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props)); if (dwc->usb3_lpm_capable) - props[prop_idx++].name = "usb3-lpm-capable"; + props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb3-lpm-capable"); if (dwc->usb2_lpm_disable) - props[prop_idx++].name = "usb2-lpm-disable"; + props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb2-lpm-disable"); /** * WORKAROUND: dwc3 revisions <=3.00a have a limitation @@ -103,7 +103,7 @@ int dwc3_host_init(struct dwc3 *dwc) * This following flag tells XHCI to do just that. */ if (dwc->revision <= DWC3_REVISION_300A) - props[prop_idx++].name = "quirk-broken-port-ped"; + props[prop_idx++] = PROPERTY_ENTRY_BOOL("quirk-broken-port-ped"); if (prop_idx) { ret = platform_device_add_properties(xhci, props); -- 2.20.1