From: Gabor Juhos <juhosg@openwrt.org>
To: Sujith <m.sujith@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
"ath9k-devel@lists.ath9k.org" <ath9k-devel@venema.h4ckr.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Jouni Malinen <jmalinen@atheros.com>,
Christoph Hellwig <hch@infradead.org>,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [ath9k-devel] [PATCH v4 07/11] ath9k: get EEPROM contents from platform data on AHB bus
Date: Thu, 15 Jan 2009 09:06:05 +0100 [thread overview]
Message-ID: <496EEE6D.6090300@openwrt.org> (raw)
In-Reply-To: <18798.41971.397753.279649@localhost.localdomain>
Sujith =EDrta:
> Gabor Juhos wrote:
>> +static bool ath_ahb_eeprom_read(struct ath_hal *ah, u32 off, u16 *d=
ata)
>> +{
>> + struct ath_softc *sc =3D ah->ah_sc;
>> + struct platform_device *pdev =3D to_platform_device(sc->dev);
>> + struct ath9k_platform_data *pdata;
>> +
>> + pdata =3D (struct ath9k_platform_data *) pdev->dev.platform_data;
>> + if (off >=3D (ARRAY_SIZE(pdata->eeprom_data))) {
>> + DPRINTF(ah->ah_sc, ATH_DBG_FATAL,
>> + "%s: flash read failed, offset %08x is out of range\n",
>> + __func__, off);
>> + return false;
>> + }
>> +
>> + *data =3D pdata->eeprom_data[off];
>> + return true;
>> +}
>> +
>=20
> Shouldn't pdev->dev.platform_data be initalized somewhere ?
It must be initialized by the board specific setup code,
> @@ -48,6 +69,12 @@ static int ath_ahb_probe(struct platform_device *p=
dev)
> int ret =3D 0;
> struct ath_hal *ah;
> =20
> + if (!pdev->dev.platform_data) {
> + dev_err(&pdev->dev, "no platform data specified\n");
> + ret =3D -EINVAL;
> + goto err_out;
> + }
> +
=2E.. and we have checked it in the probe routine anyway.
-Gabor
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-01-15 8:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-14 19:17 [PATCH v4 00/11] ath9k: add preliminary support for the AR913x SoCs Gabor Juhos
2009-01-14 19:17 ` [PATCH v4 01/11] ath9k: convert to struct device Gabor Juhos
2009-01-14 19:17 ` [PATCH v4 02/11] ath9k: convert to use bus-agnostic DMA routines Gabor Juhos
2009-01-15 2:49 ` [ath9k-devel] " Sujith
2009-01-15 8:06 ` Gabor Juhos
2009-01-15 8:24 ` Sujith
2009-01-15 8:34 ` W. van den Akker
2009-01-14 19:17 ` [PATCH v4 03/11] ath9k: introduce bus specific cache size routine Gabor Juhos
2009-01-14 19:17 ` [PATCH v4 04/11] ath9k: introduce bus specific cleanup routine Gabor Juhos
2009-01-14 19:17 ` [PATCH v4 05/11] ath9k: move PCI code into separate file Gabor Juhos
2009-01-14 19:17 ` [PATCH v4 06/11] ath9k: introduce platform driver for AHB bus support Gabor Juhos
2009-01-14 19:17 ` [PATCH v4 07/11] ath9k: get EEPROM contents from platform data on AHB bus Gabor Juhos
2009-01-15 2:48 ` [ath9k-devel] " Sujith
2009-01-15 8:06 ` Gabor Juhos [this message]
2009-01-15 8:23 ` Sujith
2009-01-14 19:17 ` [PATCH v4 08/11] ath9k: remove (u16) casts from rtc register access Gabor Juhos
2009-01-14 19:17 ` [PATCH v4 09/11] ath9k: fix ar5416Addac_9100 values Gabor Juhos
2009-01-14 19:17 ` [PATCH v4 10/11] ath9k: fix null pointer dereference in ani monitor code Gabor Juhos
2009-01-14 19:17 ` [PATCH v4 11/11] ath9k: enable support for AR9100 Gabor Juhos
2009-01-14 23:10 ` [PATCH v4 00/11] ath9k: add preliminary support for the AR913x SoCs Pavel Roskin
2009-01-15 7:11 ` Gabor Juhos
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=496EEE6D.6090300@openwrt.org \
--to=juhosg@openwrt.org \
--cc=ath9k-devel@venema.h4ckr.net \
--cc=hch@infradead.org \
--cc=jmalinen@atheros.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=m.sujith@gmail.com \
/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).