public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: mru@users.sourceforge.net (Måns Rullgård)
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Writing modules for 2.5
Date: 15 Apr 2003 14:39:14 +0200	[thread overview]
Message-ID: <yw1xbrz87x59.fsf@zaphod.guide> (raw)
In-Reply-To: <1050406513.27745.32.camel@dhcp22.swansea.linux.org.uk>

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> > Next question:  what is the correct replacement for MOD_INC_USE_COUNT?
> 
> If you know the use count is already one there isnt one, jut use
> MOD_INC_USE_COUNT and flame Rusty
> 
> If you can't prove the use count is already one for your own module
> you have a problem (and did in 2.4 in truth). The layers try and 
> lock the layer below. So char drivers are locked by core code,
> block drivers likewise, tty drivers and so on...
> 
> Most driver layers now have an owner: field in the file ops or other
> structure they register
> 
> 	owner: THIS_MODULE,
> 
> (THIS_MODULE comes out currently in a non modular buils too)

My situation is like this: I am converting a char device driver to
work with linux 2.5.  In the open and close functions there are
MOD_INC/DEC_USECOUNT calls.  The question is what they should be
replaced with.  Will it be handled correctly without them?

-- 
Måns Rullgård
mru@users.sf.net

  reply	other threads:[~2003-04-15 12:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <yw1x7k9w9flm.fsf@zaphod.guide.suse.lists.linux.kernel>
2003-04-15 11:28 ` Writing modules for 2.5 Andi Kleen
2003-04-15 12:00   ` Måns Rullgård
2003-04-15 12:05     ` Andi Kleen
2003-04-15 12:05   ` Måns Rullgård
2003-04-15 11:35     ` Alan Cox
2003-04-15 12:39       ` Måns Rullgård [this message]
2003-04-15 12:57         ` Russell King
2003-04-15 13:24           ` Dave Jones
2003-04-15 15:42           ` Måns Rullgård
2003-04-15 21:31             ` Russell King
2003-04-15 14:24         ` Alan Cox
2003-04-15 12:15     ` Andreas Henriksson
2003-04-15 12:30       ` Måns Rullgård
2003-04-15 12:58       ` Russell King
2003-04-15 11:15 Måns Rullgård
2003-04-15 14:24 ` Jonathan Corbet
2003-04-15 20:43 ` Sam Ravnborg

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=yw1xbrz87x59.fsf@zaphod.guide \
    --to=mru@users.sourceforge.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox