Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f616c6d authored by Jingoo Han's avatar Jingoo Han Committed by John W. Linville
Browse files

wireless: ath9k: use dev_get_platdata()



Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b920e375
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ static bool ath_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
	struct platform_device *pdev = to_platform_device(sc->dev);
	struct ath9k_platform_data *pdata;

	pdata = (struct ath9k_platform_data *) pdev->dev.platform_data;
	pdata = dev_get_platdata(&pdev->dev);
	if (off >= (ARRAY_SIZE(pdata->eeprom_data))) {
		ath_err(common,
			"%s: flash read failed, offset %08x is out of range\n",
@@ -84,7 +84,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
	struct ath_hw *ah;
	char hw_name[64];

	if (!pdev->dev.platform_data) {
	if (!dev_get_platdata(&pdev->dev)) {
		dev_err(&pdev->dev, "no platform data specified\n");
		return -EINVAL;
	}