public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexey Klimov <klimov.linux@gmail.com>
To: linux-media@vger.kernel.org
Cc: hverkuil@xs4all.nl, Douglas Schilling Landgraf <dougsland@gmail.com>
Subject: [questions] dmesg: Non-NULL drvdata on register
Date: Mon, 04 May 2009 15:58:42 +0400	[thread overview]
Message-ID: <1241438322.2921.13.camel@tux.localhost> (raw)

Hello, 

Not so many time ago i noticed such line in dmesg:

radio-mr800 2-1:1.0: Non-NULL drvdata on register

Quick review showed that it appears in usb_amradio_probe fucntions. Then
i found such code in v4l2_device_register() function (v4l2-device.c
file):

/* Set name to driver name + device name if it is empty. */
        if (!v4l2_dev->name[0])
                snprintf(v4l2_dev->name, sizeof(v4l2_dev->name), "%s %
s",
                        dev->driver->name, dev_name(dev));
        if (dev_get_drvdata(dev))
                v4l2_warn(v4l2_dev, "Non-NULL drvdata on register\n");
        dev_set_drvdata(dev, v4l2_dev);
        return 0;

The questions is - should i deal with this warning in dmesg? Probably
the order of callbacks in radio-mr800 probe function is incorrect.

The second questions - should i make atomic_t users counter instead of
int users counter? Then i can use atomic_inc(), atomic_dec(),
atomic_set(). It helps me to remove lock/unlock_kernel() functions. 

-- 
Best regards, Klimov Alexey


             reply	other threads:[~2009-05-04 11:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-04 11:58 Alexey Klimov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-05-04 13:03 [questions] dmesg: Non-NULL drvdata on register Hans Verkuil
2009-05-04 14:04 ` Alexey Klimov
2009-05-04 15:15 ` Janne Grunau
2009-05-04 13:03 Hans Verkuil

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=1241438322.2921.13.camel@tux.localhost \
    --to=klimov.linux@gmail.com \
    --cc=dougsland@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@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