lkml.org 
[lkml]   [2012]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] mmc: sdhci-acpi: add SDHCI ACPI driver
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.


\
 
 \ /
  Last update: 2012-11-23 11:22    [W:0.099 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site