Search Linux Wireless

Re: [RFC 07/12] ath9k: introduce platform driver for AHB bus support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christoph Hellwig írta:
> On Sat, Jan 03, 2009 at 02:44:17PM +0100, Gabor Juhos wrote:
>> +static dma_addr_t ath_ahb_map_single_to_device(struct ath_softc *sc,
>> +					       void *p, size_t size)
>> +{
>> +	return dma_map_single(NULL, p, size, DMA_TO_DEVICE);
>> +}
> 
> As said before you should just use dma_* directly.  And please make sure
> to always pass a struct device to the dma_* routines, even if your
> platform might currently not required it the API does.
> 
>> +static void ath_ahb_cleanup(struct ath_softc *sc)
>> +{
>> +	struct platform_device *pdev = to_platform_device(sc->dev);
>> +	struct ieee80211_hw *hw = sc->hw;
>> +	struct resource *res;
>> +
>> +	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>> +	if (res)
>> +		free_irq(res->start, sc);
> 
> If you stored the irq value directly in the softc this whole thing might
> be able to be done in a generic way..
> 
> 

I did not want to store it in the softc, because 'struct pci_dev' has it already
and we will duplicate it. However the code will be simpler, so i can add it of
course.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux