public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: linux-kernel@vger.kernel.org
Subject: Can a kobject have both bus- and class-specific uevent handlers?
Date: Sat, 27 Jan 2007 00:07:26 +0300	[thread overview]
Message-ID: <45BA6D8E.1040705@tls.msk.ru> (raw)

Looking at drivers/base/core.c:dev_uevent() I wonder whenever
a device can have both bus-specific uevent function AND
class-specific one.  If yes, the code in that routine is umm..
wrong.  Because in this case, bus-specific attributes will
be owerwritten by class-specific ones.

I mean this code (debugging omitted for simplicity):

    if (dev->bus && dev->bus->uevent) {
            /* have the bus specific function add its stuff */
            retval = dev->bus->uevent(dev, envp, num_envp, buffer, buffer_size);
    }

    if (dev->class && dev->class->dev_uevent) {
            /* have the class specific function add its stuff */
            retval = dev->class->dev_uevent(dev, envp, num_envp, buffer, buffer_size);
    }

    return retval;

Thanks.

/mjt

                 reply	other threads:[~2007-01-26 21:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=45BA6D8E.1040705@tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --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