From patchwork Thu Jan 26 07:43:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francesco Dolcini X-Patchwork-Id: 13116722 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 2C969C61D9D for ; Thu, 26 Jan 2023 07:45:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235884AbjAZHpZ (ORCPT ); Thu, 26 Jan 2023 02:45:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235509AbjAZHpV (ORCPT ); Thu, 26 Jan 2023 02:45:21 -0500 Received: from smtp-out-06.comm2000.it (smtp-out-06.comm2000.it [212.97.32.74]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B77266EDF; Wed, 25 Jan 2023 23:45:13 -0800 (PST) Received: from francesco-nb.pivistrello.it (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: francesco@dolcini.it) by smtp-out-06.comm2000.it (Postfix) with ESMTPSA id 1990F5612C2; Thu, 26 Jan 2023 08:45:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailserver.it; s=mailsrv; t=1674719109; bh=4edNf8hDVsHhrnz0fKugX0626QqWgyq6YjRr6TulDJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uDMM+5xmu/TP/EZafXt69VRYkK3eQEOANozP4SUYP9qA7zeT3/sTfig1FmmNmdJcf F7LXFACB4eNswuaZFcs/mdPm1hGFt19dfKyrZ88x+V2+h4beHsgdxEvJa31PL6Trcj H6yfpd9NC1gl15Kb2Q5HNzQGHdy7wh9hy4RjhujbDU5z4KHpva5zMeYEm0WxhTr2Yp smUg8dltKGq8Yj7N5l0G+3YQAmzc95BSexmLy5deAiyyoZZdVZNxDN4eMmXJyXcFqg aLEFPkuAwNYb/B6JgG8jG7y7SqpujnHdnJDi+wGcfolhR4m3XWqIiZVIUVBF3/AFpg f7UCjiSriPs+Q== From: Francesco Dolcini To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Marcel Holtmann , Luiz Augusto von Dentz Cc: Stefan Eichenberger , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Johan Hedberg , Sascha Hauer , Francesco Dolcini Subject: [PATCH v2 3/5] Bluetooth: hci_mrvl: use maybe_unused macro for device tree ids Date: Thu, 26 Jan 2023 08:43:54 +0100 Message-Id: <20230126074356.431306-4-francesco@dolcini.it> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230126074356.431306-1-francesco@dolcini.it> References: <20230126074356.431306-1-francesco@dolcini.it> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Stefan Eichenberger Use the maybe_unused macro for the device tree ids instead of #ifdef CONFIG_OF. This makes it easier to add support for new devices. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini --- v2: new patch --- drivers/bluetooth/hci_mrvl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bluetooth/hci_mrvl.c b/drivers/bluetooth/hci_mrvl.c index fbc3f7c3a5c7..eaa9c51cacfa 100644 --- a/drivers/bluetooth/hci_mrvl.c +++ b/drivers/bluetooth/hci_mrvl.c @@ -414,13 +414,11 @@ static void mrvl_serdev_remove(struct serdev_device *serdev) hci_uart_unregister_device(&mrvldev->hu); } -#ifdef CONFIG_OF -static const struct of_device_id mrvl_bluetooth_of_match[] = { +static const struct of_device_id __maybe_unused mrvl_bluetooth_of_match[] = { { .compatible = "mrvl,88w8897" }, { }, }; MODULE_DEVICE_TABLE(of, mrvl_bluetooth_of_match); -#endif static struct serdev_device_driver mrvl_serdev_driver = { .probe = mrvl_serdev_probe,