Re: [PATCH][resubmit] TPM: update char dev BKL pushdown

From: Alan Cox
Date: Tue Aug 26 2008 - 17:48:14 EST


> + atomic_set(&chip->is_open, 1);
> + get_device(chip->dev); /* protect from chip disappearing */

Why not just use test_and_set_bit() ? You seem to be abusing atomic_t to
achieve this.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/