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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A88D3C41513 for ; Mon, 24 Jul 2023 02:04:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232299AbjGXCEB (ORCPT ); Sun, 23 Jul 2023 22:04:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230040AbjGXCDr (ORCPT ); Sun, 23 Jul 2023 22:03:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8ED895FD1; Sun, 23 Jul 2023 18:56:11 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9533261019; Mon, 24 Jul 2023 01:34:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CC9EC433CB; Mon, 24 Jul 2023 01:34:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690162448; bh=0ixMFmS8xecmkXLwC0SULB3goZzazU5OmPDTHqTNvBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C4fJjLC8wQfLCHQIsUsDDA/3RZppp4y1NNFLCK+fOfDphq8lXCG497SjnUtriIz+b lp+zCi8N9nr4lrFB5q1cn2/Lda5Z5Glss7794osNORQ8VDVrGFcW+B4RrBFJuzSRaJ TjWGgKisVT0DHzDgy/4lBnKZAog1i+pCrqiv+h2RrvUwwAaZfKiXYUcqBJ9qIVDdQA eyYu7WSfZ5mD+GfM71Hg6siZUHCTqLQ4Vw451jB2CqPQenWMhSQQFX4rGNyflxcacf fZp0ty9cNFY8efwb4UH3wHNcirKb/m5Y1H6/DlmKPGzhJKi6dLWAwoTVg/pxzCTClt i0ELNSF7qWl3A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mathias Nyman , Greg Kroah-Hartman , Sasha Levin , mathias.nyman@intel.com, linux-usb@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 04/16] xhci: Don't require a valid get_quirks() function pointer during xhci setup Date: Sun, 23 Jul 2023 21:33:48 -0400 Message-Id: <20230724013401.2333159-4-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230724013401.2333159-1-sashal@kernel.org> References: <20230724013401.2333159-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.10.186 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Mathias Nyman [ Upstream commit 9b907c91aa94522ae14bf155ce7b9ccb10a0903c ] Not all platforms drivers need to set up custom quirks during the xhci generic setup. Allow them to pass NULL as the function pointer when calling xhci_gen_setup() Signed-off-by: Mathias Nyman Message-ID: <20230602144009.1225632-4-mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/host/xhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index b069fe3f8ab0b..2231ddedd522f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -5296,7 +5296,8 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks) xhci->quirks |= quirks; - get_quirks(dev, xhci); + if (get_quirks) + get_quirks(dev, xhci); /* In xhci controllers which follow xhci 1.0 spec gives a spurious * success event after a short transfer. This quirk will ignore such -- 2.39.2