Already done in 2.6.11-rc2, look below for some comments.
On 24/01/05 21:00 +0530, Amit Gud wrote:
> Unify the spinlock initialization as far as possible.
>
> Do consider applying.
>
> Signed-off-by: Amit Gud <[EMAIL PROTECTED]>
>
> --- vanilla-2.6.10/drivers/char/drm/drm_auth.h 2004-10-19
> 03:25:07.000000000 +0530
> +++ linux-2.6.10/drivers/char/drm/drm_auth.h 2005-01-24 20:07:39.000000000
> +0530
> @@ -174,11 +174,12 @@ int DRM(getmagic)(struct inode *inode, s
> unsigned int cmd, unsigned long arg)
> {
> static drm_magic_t sequence = 0;
> - static spinlock_t lock = SPIN_LOCK_UNLOCKED;
> + static spinlock_t lock;
> drm_file_t *priv = filp->private_data;
> drm_device_t *dev = priv->dev;
> drm_auth_t auth;
> -
> +
You added whitespace.
> + spin_lock_init(&lock);
This changes behaviour, because of static lock wasn't initialized on
every function run, now it is, which makes it rather useless.
Correct way to do this seems to be what is already in 2.6.11-rc2 in
drm_auth.c:
static drm_magic_t sequence = 0;
static DEFINE_SPINLOCK(lock);
drm_file_t *priv = filp->private_data;
Domen
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel