LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-07-2009, 08:34 AM   #1
Carrot23
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
 
  


Reply


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 07:50 AM
help for char device driver kirany Linux - Software 1 01-11-2009 05:12 PM
char device programming shariefbe Linux - Newbie 1 10-04-2008 03:33 PM
char device module the_uplink2x Programming 2 05-24-2005 10:53 PM
char device i810_rng djgerbavore Linux - Newbie 1 08-18-2004 08:33 PM


All times are GMT -5. The time now is 05:53 PM.

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