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 D1290C001DC for ; Mon, 24 Jul 2023 01:45:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232361AbjGXBo7 (ORCPT ); Sun, 23 Jul 2023 21:44:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232427AbjGXBnH (ORCPT ); Sun, 23 Jul 2023 21:43:07 -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 AAF1B55A3; Sun, 23 Jul 2023 18:37:46 -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 F328C60FA1; Mon, 24 Jul 2023 01:33:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA535C433C7; Mon, 24 Jul 2023 01:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690162415; bh=BGYcpb2e8Z0ig1uFHfhB4Y6OFGHlqiT1ZnfHtlr94/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tXziU1AyLAIeM+LwaPxa3inep59lCc0b6jgSGnw/CYT7oSNDbvuKYh1H8r2gS16Mk 40u2aoQySs8uvF+JjTptey9Q+aeICEQtq2V+g4Q3GIzfEB+uHongym/ottR+2yxmv+ y3rhS1aJXgHXhQ14/ejr52NeQ35YQ4yeN01Wf9uLEc8Rn84Qb7ohl5iTPCXS2dSM9D /KMzMOPSuGhp5ectcGIjCwy6c/OA12BHWfrHPdNaQqI7ZVOItBFH3KBYH8CtefQJlL 2vp9hfbTil5kgXAiu7Geo+Tr+dYcIh5CPJSOWlLoRB6QQ9r8ePfrE8cVL5VAzC+NEX FD5crWYk1iNbg== 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.15 06/24] xhci: Don't require a valid get_quirks() function pointer during xhci setup Date: Sun, 23 Jul 2023 21:33:07 -0400 Message-Id: <20230724013325.2332084-6-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230724013325.2332084-1-sashal@kernel.org> References: <20230724013325.2332084-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 5.15.121 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 1fd2f6a850ebc..970dcd17ac7fa 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -5338,7 +5338,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