From patchwork Wed Oct 11 13:46:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 115550 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp646285edb; Wed, 11 Oct 2017 06:47:00 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBnS3D3uAKPye0qKDuJfK68/JiuVGzLf1Wa9rXqAWS/nCk65e6BBR2fBVuxnnm67Zy15U3d X-Received: by 10.98.4.67 with SMTP id 64mr14278895pfe.214.1507729620691; Wed, 11 Oct 2017 06:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507729620; cv=none; d=google.com; s=arc-20160816; b=aMzWXQaBH2VciqaLG20HsBmlukw6RCnAFkarzhjuDm4F0ZTtpiIUzbOGf60wmIJIpA fP4oOv193yK4MuqOKtKjvMlgm1NDKerxnuhbOHpi5SLfLXP5YGiFmgX2XFBvAxR8NdUe ktywaWlgKAXODIkfjsqnhsmn6S7ZDSi4du267lpWhTuMDx6k5ogJrlpn23NzXlYjfuw8 kiZmHXHu8ZvO+3irb4SrE6GRwCryJVaMlkdOLjdPWfGGpmU9plN18MJNgWqQj1lF9yCS hXel1k/96qbaqguQdJqylHvwf1PxP1EVHusUlDiz0Hj7OdO15+tauoIypqHLLd3l+FK/ eIJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=52Dl0eEw5iTL90OEQepO+hI+x+9pHXmYSj41yJIVeWE=; b=Q60sCWOgCcukJOkEWVWslho9GchbkQj9oLQQ7D8uZVFLjX7X9GwvUd231SC8CVz/kQ Sm+dQ1yYVoRFH8qGVfA2+pZwLYT8T/BJylTYghlc4ZLZ3dwkRMdYXJCcuCS9pTuNH1f9 Nh6Sm5fTcNlf4VZFZCPQgK/8CvTEompCdxNWK4jwVQ4OlCuPGZSWGSGQ9KiUIzCIRUU+ Y3Rgr4SWo/g9CjHUR9+2yO5hYDQ5/98uSqizK9hTKCWHH+NT8vxPSqucau6fvwgRmnvl hZcdJAO4p0FV+HqBIugqiZAvrGZR6InbycenHyKDjM1M2lvHsF8cL/EJe1ih9JbWqrpU BSgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si7898454plo.817.2017.10.11.06.47.00; Wed, 11 Oct 2017 06:47:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757274AbdJKNq6 (ORCPT + 26 others); Wed, 11 Oct 2017 09:46:58 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:61223 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbdJKNq4 (ORCPT ); Wed, 11 Oct 2017 09:46:56 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0Luu13-1dKjFS24G1-01059f; Wed, 11 Oct 2017 15:46:43 +0200 From: Arnd Bergmann To: Marcel Holtmann , Gustavo Padovan , Johan Hedberg Cc: Arnd Bergmann , Hans de Goede , Loic Poulain , "David S. Miller" , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] Bluetooth: hci_bcm: fix build error without CONFIG_PM Date: Wed, 11 Oct 2017 15:46:21 +0200 Message-Id: <20171011134640.3152236-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:w4pizZPmCxTUQXszJgA3myaa+OqF56yol5j0qFrRenwTwTtYtcL pZOP5sd4hEkfaITGFqMtalXAEwlejpoqTOLJD5oIq7Z5s1pPwj641ZZKzrR5EEdG9P0xaE+ HymGcgTSbcYbiMHcf8ges58TuokICBGvWAb9+C41tgFefzKSC4RPABJ2rgq+tb4m5rRuA0L ZKhCLgw3uYzxvUCwecx/A== X-UI-Out-Filterresults: notjunk:1; V01:K0:g0ArlCHW9rE=:tzOM1L7nS24rUOEGsIl3AV 60WXq6ppCnoa4VfK8/fpxhOClOSCtmAaHeClyUKQqzEuwLhSSoYZqM12mka1sD7rliucj3ScO +5l2C+P6x8Wg/C9AIxfDt0sxWOhP/brw3X+nIXtpylPJXVrslczT6n28hB6gCKvFWTvPbBz/6 1cjupB1KBXax+gyWSdzQGy/xsiWwa8qiQtGVRdPBSa6f4UMwFJaf5ijF/ecdR0Jw459SXePcn 0Ob2/Dd3YwrQ8btapfAmESV0PwY476N/+fwuZsUiIZsbSvbPyR0Q6DcWyRoSGzO8kVDZdm4Ax HCMK3+PEdKIQQ1wVnLnEgJA49VBnKQBIB0q22J8iH7KeKeHCfFrx9/N+THiLGXh7aRSrftV9S PFof2X95LolezACQ3y1SZKKKvxOmIiQKNpJMEUredHQVg+1H8tWukNjc4XL7CvCsOjY27Mi90 aWIMOLTHW8DConCwUJTNohQBvwrEsvA3YZh8ipwGvvlVtpi4MA6upNl76kYGy+/A16zY8KzUX XElruK4mKtfmWQx5w+y7VDSHBWws8s4b1r0M0vHBjATTgvfkZwEBen6qlZkXVvbhRlbaX2NHA WFpGIl+1MARaUyw3roaqFzhk22L0MgKW4D2hBAa3100qgaFqVWEsUewevLY16XxjCm/+YUqQd Dg81DTyAzuQ2HsKesXbWr8//UrL4Nd51Tf/McbNvonrtKHHbOdVgIbFWjVfT3eWrTDCL35fut qI8GI0c4htruRRo4LzIDDf+Y97mTKqc7WeGtIw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This was introduced by the rework adding PM support: drivers/bluetooth/hci_bcm.c: In function 'bcm_device_exists': drivers/bluetooth/hci_bcm.c:156:22: error: 'struct bcm_device' has no member named 'hu' if (device && device->hu && device->hu->serdev) ^~ The pointer is not available otherwise, so I'm enclosing all references in an #ifdef here. Fixes: 8a92056837fd ("Bluetooth: hci_bcm: Add (runtime)pm support to the serdev driver") Signed-off-by: Arnd Bergmann --- drivers/bluetooth/hci_bcm.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.9.0 Reviewed-by: Hans de Goede diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index ab1455e63b92..089bd0473451 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -152,9 +152,11 @@ static bool bcm_device_exists(struct bcm_device *device) { struct list_head *p; +#ifdef CONFIG_PM /* Devices using serdev always exist */ if (device && device->hu && device->hu->serdev) return true; +#endif list_for_each(p, &bcm_device_list) { struct bcm_device *dev = list_entry(p, struct bcm_device, list); @@ -965,7 +967,9 @@ static int bcm_serdev_probe(struct serdev_device *serdev) return -ENOMEM; bcmdev->dev = &serdev->dev; +#ifdef CONFIG_PM bcmdev->hu = &bcmdev->serdev_hu; +#endif bcmdev->serdev_hu.serdev = serdev; serdev_device_set_drvdata(serdev, bcmdev); From patchwork Wed Oct 11 13:47:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 115551 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp647484edb; Wed, 11 Oct 2017 06:48:19 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDsXzNLVkvpTZFTE/RYZqekocdRf4OK6vksIeECwmXqSuMskH7T6nuOosvWsSqcvRHy5/WU X-Received: by 10.101.77.208 with SMTP id q16mr7942133pgt.146.1507729699456; Wed, 11 Oct 2017 06:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507729699; cv=none; d=google.com; s=arc-20160816; b=W4deJa/eMHOxumSGqy9IfEcfHLJsJwjx2+5mcPSb8PWeYIfwj42gDke4vjC/+dScCs 6HfJsJY58B4O7/XRjEjuhM0UMvnq9EUGQBXQchAJsyLqOHcpbhI3Ns7iGKwoQMCinaOv XOm47JENKpcssBA5U3WdOJs9nG0ZIFLRl9cGcOrS68Xvhz8mZMm5+2H0tlCrmWuuFUuz ULn9BA+M6okOxWOPyAgy4dI5xX3WaDr0jHBYUh5ZD3Asav7wVQ0x+gGw8cViWfPu8hBb dB/DJww7Kb4X/93Nf/mTJx+xPN8coMXFGpZa4RjqQGZOigROQwLApWulkR/lh2dbklJM bzmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=SkAjF8CldZ4idyop5kiWXyxGO5qfxUGkDbKtOqq0Vc4=; b=jveyktCkC62ph3XCHBZrkQTYgpmzLl3hLvu9ovp/RHyUerV7AuguHJQQfRqaz931aJ niFc13z2ygCrkSWbGErd9pQgrW2ESfTM0QrhWRT0DqEuOZdhBHHc0GtdC59pzp0C1YU3 +TmNm0IBUwpkK9xI5aStDdfQ6txSlFGRgmAiCI18GBhYy8+gAjvJlT3dqPFiuox4E+Ls vVvSkLxEdilc7pCDrpvIXkcNrelFrVz9xx+vnUdjaxiyZupC+4HnLyoAQ2yKJRC/MJG+ ODv02351zblj7/t8Odnoc8o4KZ6qS7OcXKqa5idtXlVGQs2uRXfl7jryqfgmbFKiOuUI L9eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p33si10901858pld.75.2017.10.11.06.48.19; Wed, 11 Oct 2017 06:48:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752886AbdJKNsR (ORCPT + 26 others); Wed, 11 Oct 2017 09:48:17 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:50414 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752096AbdJKNsP (ORCPT ); Wed, 11 Oct 2017 09:48:15 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0LeQLR-1dUaa33ePd-00q9y1; Wed, 11 Oct 2017 15:48:07 +0200 From: Arnd Bergmann To: Marcel Holtmann , Gustavo Padovan , Johan Hedberg Cc: Hans de Goede , Arnd Bergmann , Sebastian Reichel , Tobias Regnery , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] Bluetooth: BT_HCIUART now depends on SERIAL_DEV_BUS Date: Wed, 11 Oct 2017 15:47:54 +0200 Message-Id: <20171011134805.3207569-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20171011134640.3152236-1-arnd@arndb.de> References: <20171011134640.3152236-1-arnd@arndb.de> X-Provags-ID: V03:K0:+ZIc6mjT09LVenQ6H//YgZrfPILdOAXLNMPfDuPnTmb/b8NGgjC Dj+yDbSk6YOA5y3h8Nab7A+sWmYNu8Rb0pYGSbF7u2H3giP5SVVuHN6z0y6ROTvaMOufE8S ZN6eB7gwFpHI6mKMbl/nRZ5qYgJowWOb3xFe6wFBz0ZApNFM9SgxaEwHEKxpOHEpruwlUOE jN9zPAhejucw7pETyW0UQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:un9sBsKyTFA=:yqjvByPUgQWHD3/hLg5Skm Vl3xAXIL0uTq6tThbka8XxOPyJBlzpxCKzqW4PlS5XWU3zJad+M3PedUsouA/uJK0TAbCsItX qkvSONyIZqqdzmURqaGYhFX6uqE/+vRTyoZlh1ya2pD+GIRMBVUizWWUwK7tjFdWTuG19EVaF odEDztGCUisYLcD+VlHPn9Sw+sqFqQBouHPYMUANjstmb7m79SMK3umL6K1pM2//XyKBgCALr CM3VFFqyr9sa1efmpoJMM3Jp2lwo6VP86ggbkIBWH7t/iGhFPZrOnFNhJ86rXOgkrUweEfGrr S9tLgvGtws0v6VfZWROSoQNw17fLzeU42EYKKozjG+1E3047oALerN5hr6pNaIuIUYnsxFE+O JnbeMKDLEFKeJF6oRnUSzd11s89mwvGcf7cJyoFSBw+3w10REFB/E4pClxcyNdhSU3kmGxVmq P8U34+0/CdH/cW6fobtt1cuVX2hsdnKSujsDslW6kRDyUKYxUhG6LII/1aGWok7kzO/05qGSJ jbc0qDSp8Le8H3958aSjkadoBUj5B4T3ourmwrgcqUa1xtiJ7hLOkMw9LcnGcQimkJS8L/N7s 3qOqWDyDJmd455U8zE51dn2dMai+mt5wEKRrgm+Onz9y0K5jqBEdwuYIaP81nF1WV7l1EcqTw b/WkY2JFzbvfhMTXTMUURTf8y6XwhLhRt5BFHY2SDmDz51LePjUFuzGRB8dywJstWv2VU9qi+ Z5sN3Miz/D9HgaBxT8kIx9qs1mZ9o+7bwz72lg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is no longer possible to build BT_HCIUART into the kernel when SERIAL_DEV_BUS is a loadable module, even if none of the SERIAL_DEV_BUS based implementations are selected: drivers/bluetooth/hci_ldisc.o: In function `hci_uart_set_flow_control': hci_ldisc.c:(.text+0xb40): undefined reference to `serdev_device_set_flow_control' hci_ldisc.c:(.text+0xb5c): undefined reference to `serdev_device_set_tiocm' This adds a dependency to avoid the broken configuration. Fixes: 7841d554809b ("Bluetooth: hci_uart_set_flow_control: Fix NULL deref when using serdev") Signed-off-by: Arnd Bergmann --- drivers/bluetooth/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index fae5a74dc737..4427d54b7331 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig @@ -65,6 +65,7 @@ config BT_HCIBTSDIO config BT_HCIUART tristate "HCI UART driver" + depends on SERIAL_DEV_BUS || !SERIAL_DEV_BUS depends on TTY help Bluetooth HCI UART driver. @@ -79,7 +80,6 @@ config BT_HCIUART config BT_HCIUART_SERDEV bool depends on SERIAL_DEV_BUS && BT_HCIUART - depends on SERIAL_DEV_BUS=y || SERIAL_DEV_BUS=BT_HCIUART default y config BT_HCIUART_H4