LKML Archive on
help / color / mirror / Atom feed
From: Jan Engelhardt <>
To: "linux-os (Dick Johnson)" <>
Cc: Erik Mouw <>,
	Jesper Juhl <>, congwen <>,
	linux-kernel <>
Subject: Re: How can I create or read/write a file in linux device driver?
Date: Fri, 12 Jan 2007 23:31:29 +0100 (MET)	[thread overview]
Message-ID: <Pine.LNX.4.61.0701122329000.19224@yvahk01.tjqt.qr> (raw)
In-Reply-To: <>

On Jan 12 2007 09:27, linux-os (Dick Johnson) wrote:
>First, since file-operations require process context, and the kernel
>is not a process, you need to create a kernel thread to handle your file

Not always. If you do file I/O as part of a device driver, you are fine.
quad_dsp is such an example, where writing to /dev/Qdsp_* will trigger writes
to /dev/dsp and /dev/adsp.

>Once you set up this "internal environment," you use the appropriate
>kernel function(s) such as sys_open()

What against filp_open? That avoids the unnecessary getname() stuff in most


  parent reply	other threads:[~2007-01-12 22:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-12  7:47 congwen
2007-01-12 10:27 ` Jesper Juhl
2007-01-12 10:43   ` Jan Engelhardt
2007-01-12 10:54     ` Jesper Juhl
2007-01-12 10:59       ` Jan Engelhardt
2007-01-12 13:24   ` Erik Mouw
2007-01-12 14:27     ` linux-os (Dick Johnson)
2007-01-12 14:42       ` Erik Mouw
2007-01-12 22:31       ` Jan Engelhardt [this message]
2007-01-19 10:35       ` Helge Hafting

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0701122329000.19224@yvahk01.tjqt.qr \ \ \ \ \ \ \
    --subject='Re: How can I create or read/write a file in linux device driver?' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).