Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-07-2009, 09:34 AM   #1
LQ Newbie
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
Question Using DMA in a char device

Hi folks,

I'm a experienced Windows device driver writer (sorry) but now I'm writting my first Linux driver.
It's a char device that should handle DMA transfers in his read/write operations.
The problem I have now is, that all DMA calls like
dma_map_single(), ....
needs a pointer to "struct device" (dma_map_single(struct device *dev, ....))

Because I registered my device with register_chrdev_region(..) and cdev_add(...) my device representation uses type "struct cdev" but no "struct device"

Is there someting I must add during device initialization or is there a way to get a "struct device" from "struct cdev" ?

Thanks in advance


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Char device not visible in /dev cold Linux - Kernel 1 02-03-2009 08:50 AM
help for char device driver kirany Linux - Software 1 01-11-2009 06:12 PM
char device programming shariefbe Linux - Newbie 1 10-04-2008 04:33 PM
char device module the_uplink2x Programming 2 05-24-2005 11:53 PM
char device i810_rng djgerbavore Linux - Newbie 1 08-18-2004 09:33 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration