Lines Matching refs:pdev
62 struct platform_device *pdev = to_platform_device(sc->dev); in ath_ahb_eeprom_read() local
65 pdata = dev_get_platdata(&pdev->dev); in ath_ahb_eeprom_read()
83 static int ath_ahb_probe(struct platform_device *pdev) in ath_ahb_probe() argument
89 const struct platform_device_id *id = platform_get_device_id(pdev); in ath_ahb_probe()
95 if (!dev_get_platdata(&pdev->dev)) { in ath_ahb_probe()
96 dev_err(&pdev->dev, "no platform data specified\n"); in ath_ahb_probe()
100 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in ath_ahb_probe()
102 dev_err(&pdev->dev, "no memory resource found\n"); in ath_ahb_probe()
106 mem = devm_ioremap_nocache(&pdev->dev, res->start, resource_size(res)); in ath_ahb_probe()
108 dev_err(&pdev->dev, "ioremap failed\n"); in ath_ahb_probe()
112 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); in ath_ahb_probe()
114 dev_err(&pdev->dev, "no IRQ resource found\n"); in ath_ahb_probe()
123 dev_err(&pdev->dev, "no memory for ieee80211_hw\n"); in ath_ahb_probe()
127 SET_IEEE80211_DEV(hw, &pdev->dev); in ath_ahb_probe()
128 platform_set_drvdata(pdev, hw); in ath_ahb_probe()
132 sc->dev = &pdev->dev; in ath_ahb_probe()
138 dev_err(&pdev->dev, "request_irq failed\n"); in ath_ahb_probe()
144 dev_err(&pdev->dev, "failed to initialize device\n"); in ath_ahb_probe()
162 static int ath_ahb_remove(struct platform_device *pdev) in ath_ahb_remove() argument
164 struct ieee80211_hw *hw = platform_get_drvdata(pdev); in ath_ahb_remove()