linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Gustavo Padovan <gustavo@padovan.org>,
	Johan Hedberg <johan.hedberg@gmail.com>
Cc: "Hans de Goede" <hdegoede@redhat.com>,
	"Frédéric Danis" <frederic.danis.oss@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	robh@kernel.org, linux-bluetooth@vger.kernel.org,
	linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: [PATCH v2 3/9] Bluetooth: hci_bcm: Move bcm_platform_probe call out of bcm_acpi_probe
Date: Wed,  4 Oct 2017 20:43:37 +0200	[thread overview]
Message-ID: <20171004184343.7855-3-hdegoede@redhat.com> (raw)
In-Reply-To: <20171004184343.7855-1-hdegoede@redhat.com>

Since bcm_acpi_probe calls bcm_platform_probe, bcm_probe always ends up
calling bcm_platform_probe.

This commit simplifies things by making bcm_probe always call
bcm_platform_probe itself.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/bluetooth/hci_bcm.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 2285ca673ae3..00103307a776 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -820,10 +820,6 @@ static int bcm_acpi_probe(struct bcm_device *dev)
 	if (ret)
 		return ret;
 
-	ret = bcm_platform_probe(dev);
-	if (ret)
-		return ret;
-
 	/* Retrieve UART ACPI info */
 	ret = acpi_dev_get_resources(ACPI_COMPANION(&dev->pdev->dev),
 				     &resources, bcm_resource, dev);
@@ -858,10 +854,13 @@ static int bcm_probe(struct platform_device *pdev)
 
 	dev->pdev = pdev;
 
-	if (has_acpi_companion(&pdev->dev))
+	if (has_acpi_companion(&pdev->dev)) {
 		ret = bcm_acpi_probe(dev);
-	else
-		ret = bcm_platform_probe(dev);
+		if (ret)
+			return ret;
+	}
+
+	ret = bcm_platform_probe(dev);
 	if (ret)
 		return ret;
 
-- 
2.14.2


  parent reply	other threads:[~2017-10-04 18:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 18:43 [PATCH v2 1/9] Bluetooth: hci_uart_set_flow_control: Fix NULL deref when using serdev Hans de Goede
2017-10-04 18:43 ` [PATCH v2 2/9] Bluetooth: hci_bcm: Fix setting of irq trigger type Hans de Goede
2017-10-04 18:43 ` Hans de Goede [this message]
2017-10-04 18:43 ` [PATCH v2 4/9] Bluetooth: hci_bcm: Move platform_get_irq call to bcm_probe Hans de Goede
2017-10-04 18:43 ` [PATCH v2 5/9] Bluetooth: hci_bcm: Store device pointer instead of platform_device pointer Hans de Goede
2017-10-04 18:43 ` [PATCH v2 6/9] Bluetooth: hci_bcm: Rename bcm_platform_probe to bcm_get_resources Hans de Goede
2017-10-04 18:43 ` [PATCH v2 7/9] Bluetooth: hci_bcm: Make acpi_probe get irq from ACPI resources Hans de Goede
2017-10-04 18:43 ` [PATCH v2 8/9] Bluetooth: hci_bcm: Make suspend/resume functions platform_dev independent Hans de Goede
     [not found] ` <20171004184343.7855-1-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-04 18:43   ` [PATCH v2 9/9] Bluetooth: hci_bcm: Add (runtime)pm support to the serdev driver Hans de Goede
     [not found]     ` <20171004184343.7855-9-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-10-05 10:45       ` Marcel Holtmann
     [not found]         ` <DFCF661F-6FE0-4449-A169-D71ED9282074-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2017-10-05 11:18           ` Hans de Goede
2017-10-05 15:15             ` Marcel Holtmann
     [not found]               ` <17592E57-3A4B-4386-B809-9EA928D38FDD-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2017-10-05 17:53                 ` Hans de Goede
2017-10-06 18:33                   ` Marcel Holtmann
2017-10-07 14:26               ` Johan Hovold
2017-10-09 14:02                 ` Hans de Goede
2017-10-09 14:22                   ` Johan Hovold
2017-10-07 14:36 ` [PATCH v2 1/9] Bluetooth: hci_uart_set_flow_control: Fix NULL deref when using serdev Johan Hovold
2017-10-09 14:06   ` Hans de Goede
2017-10-09 15:15     ` Johan Hovold
2017-10-09 18:01     ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171004184343.7855-3-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=frederic.danis.oss@gmail.com \
    --cc=gustavo@padovan.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).