Thread (5 messages) 5 messages, 2 authors, 2012-11-23

Re: [PATCH 3/3] mmc: sdhci-acpi: add SDHCI ACPI driver

From: Mika Westerberg <mika.westerberg@linux.intel.com>
Date: 2012-11-23 09:40:51
Also in: linux-mmc, lkml

On Thu, Nov 22, 2012 at 10:43:50AM +0200, Adrian Hunter wrote:
+static int __devinit sdhci_acpi_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	acpi_handle handle = dev->acpi_handle;
This is not going to work anymore, you'll have to use ACPI_HANDLE(dev) for
this (there was a new macro introduced with the struct acpi_dev_node).
+	struct acpi_device *device;
+	struct sdhci_acpi_host *c;
+	struct sdhci_host *host;
+	struct resource *iomem;
+	resource_size_t len;
+	const char *hid;
+	int err;
+
+	if (acpi_bus_get_device(handle, &device))
+		return -ENODEV;
+
+	if (acpi_bus_get_status(device) || !device->status.present)
+		return -ENODEV;
This is a bit redundant as the platform code already checks whether the
device is present or not and only creates the platform device in case it is
present.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help