diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2017-07-19 23:21:03 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2017-07-20 12:16:47 +0200 |
commit | 937a9d05a41218cfbf0d6c75f7c676b13884d93d (patch) | |
tree | a1960b00d4e252c16910c5d329b7513fbfbf8d8e /drivers | |
parent | c8c35a36c85d70497c3382d0b5cb11d95bf610e6 (diff) | |
download | barebox-937a9d05a41218cfbf0d6c75f7c676b13884d93d.tar.gz barebox-937a9d05a41218cfbf0d6c75f7c676b13884d93d.tar.xz |
mci: atmel_mci: fix devinfo DEV with OF enabled
devinfo DEV resulted in a NULL pointer expection.
As platform_data is only valid in non-DT setup,
fix this so we no longer reference platform_data
outside the probe function
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mci/atmel_mci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c index 317cf46022..0d3b245ced 100644 --- a/drivers/mci/atmel_mci.c +++ b/drivers/mci/atmel_mci.c @@ -474,7 +474,6 @@ static int atmci_request(struct mci_host *mci, struct mci_cmd *cmd, struct mci_d static void atmci_info(struct device_d *mci_dev) { struct atmel_mci *host = mci_dev->priv; - struct atmel_mci_platform_data *pd = host->hw_dev->platform_data; printf(" Bus data width: %d bit\n", host->mci.bus_width); @@ -490,7 +489,7 @@ static void atmci_info(struct device_d *mci_dev) printf("- %u Hz upper limit", host->mci.f_max); printf("\n Card detection support: %s\n", - gpio_is_valid(pd->detect_pin) ? "yes" : "no"); + gpio_is_valid(host->detect_pin) ? "yes" : "no"); } /* |