Lines Matching +full:sc +full:- +full:resource
2 * Copyright (c) 2008-2011 Atheros Communications Inc.
75 struct ath_softc *sc; in ath_ahb_probe() local
77 struct resource *res; in ath_ahb_probe()
84 if (!dev_get_platdata(&pdev->dev)) { in ath_ahb_probe()
85 dev_err(&pdev->dev, "no platform data specified\n"); in ath_ahb_probe()
86 return -EINVAL; in ath_ahb_probe()
91 dev_err(&pdev->dev, "no memory resource found\n"); in ath_ahb_probe()
92 return -ENXIO; in ath_ahb_probe()
95 mem = devm_ioremap(&pdev->dev, res->start, resource_size(res)); in ath_ahb_probe()
97 dev_err(&pdev->dev, "ioremap failed\n"); in ath_ahb_probe()
98 return -ENOMEM; in ath_ahb_probe()
108 dev_err(&pdev->dev, "no memory for ieee80211_hw\n"); in ath_ahb_probe()
109 return -ENOMEM; in ath_ahb_probe()
112 SET_IEEE80211_DEV(hw, &pdev->dev); in ath_ahb_probe()
115 sc = hw->priv; in ath_ahb_probe()
116 sc->hw = hw; in ath_ahb_probe()
117 sc->dev = &pdev->dev; in ath_ahb_probe()
118 sc->mem = mem; in ath_ahb_probe()
119 sc->irq = irq; in ath_ahb_probe()
121 ret = request_irq(irq, ath_isr, IRQF_SHARED, "ath9k", sc); in ath_ahb_probe()
123 dev_err(&pdev->dev, "request_irq failed\n"); in ath_ahb_probe()
127 ret = ath9k_init_device(id->driver_data, sc, &ath_ahb_bus_ops); in ath_ahb_probe()
129 dev_err(&pdev->dev, "failed to initialize device\n"); in ath_ahb_probe()
133 ah = sc->sc_ah; in ath_ahb_probe()
135 wiphy_info(hw->wiphy, "%s mem=0x%p, irq=%d\n", in ath_ahb_probe()
141 free_irq(irq, sc); in ath_ahb_probe()
152 struct ath_softc *sc = hw->priv; in ath_ahb_remove() local
154 ath9k_deinit_device(sc); in ath_ahb_remove()
155 free_irq(sc->irq, sc); in ath_ahb_remove()
156 ieee80211_free_hw(sc->hw); in ath_ahb_remove()