Re: howto provide io memory to PCI card

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

 



On Wed, May 12, 2010 at 03:10:55PM -0400, Charles Brown wrote:
> Eike,
> 
>    dma_sync_single_for_cpu() takes a 'struct device *', but the
> device I'm using with pci_alloc_consistent() is a 'struct pci_dev
> *'.  where do I get the 'struct device *'?  I looked at the pci_dev
> structure, and it doesn't seem to have a pertinent member i can use.

You didn't look that hard:
	struct  device  dev;            /* Generic device interface */

is part of struct pci_dev.

> Should I just declare one locally?

No, use the one in struct pci_dev, that's the correct one.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux