From patchwork Fri Jun 2 14:40:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 688990 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 7D56EC77B7A for ; Fri, 2 Jun 2023 14:39:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236028AbjFBOjA (ORCPT ); Fri, 2 Jun 2023 10:39:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235983AbjFBOi7 (ORCPT ); Fri, 2 Jun 2023 10:38:59 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0614EBC for ; Fri, 2 Jun 2023 07:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685716739; x=1717252739; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HDM/7vbm+BPyZ52vnGwOz5UNyHQ6oKM2WK+m3+r0RqA=; b=hlELZfZ4RHNJ5Bw5HK6Y+eJxPYbNEoDHM3hiVw1MpCAINOKxM45fK8L4 l/yzmHZ0+G5qCiliSERrpXr0whIc/ZIgVbskFFl+6Rjtrj6eWAVCPim/5 q9/wk0GWPxEdzx/JdJiG3JtyabwWaLaAdMjzXFZeMiwuzmT4FeJXUtkak iHVuTJiNcoh5PIZK59HPXPb6awRn9eUGbFgc/z8ePZGTHBfPwy1Xxbpl4 vuBZotONFGk/YjqABFjyoUpcnoexpzONvkYF7L/vVrQA/idBbK3QpyY7/ ET0p9xnMBEk4pjTnUcdOmQxDHwjk5Gb2wbnjpFS+ZfgQFA3V51ev/Hemg Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="358311235" X-IronPort-AV: E=Sophos;i="6.00,213,1681196400"; d="scan'208";a="358311235" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2023 07:38:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="707877446" X-IronPort-AV: E=Sophos;i="6.00,213,1681196400"; d="scan'208";a="707877446" Received: from mattu-haswell.fi.intel.com ([10.237.72.199]) by orsmga002.jf.intel.com with ESMTP; 02 Jun 2023 07:38:56 -0700 From: Mathias Nyman To: Cc: , Mathias Nyman Subject: [PATCH 03/11] xhci: Don't require a valid get_quirks() function pointer during xhci setup Date: Fri, 2 Jun 2023 17:40:01 +0300 Message-Id: <20230602144009.1225632-4-mathias.nyman@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230602144009.1225632-1-mathias.nyman@linux.intel.com> References: <20230602144009.1225632-1-mathias.nyman@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 --- 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 3a13e2453203..176969bf2d5c 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -5181,7 +5181,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