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

From: James Morris
Date: Fri Aug 22 2008 - 18:59:24 EST


On Fri, 22 Aug 2008, Serge E. Hallyn wrote:

> Quoting Rajiv Andrade (srajiv@xxxxxxxxxxxxxxxxxx):
> > This patch removes the BKL calls from the TPM driver, which
> > were added in the overall misc-char-dev-BKL-pushdown.patch,
> > as they are not needed. Changed num_opens from an int to atomic_t.
> >
> > Signed-off-by: Mimi Zohar <zohar@xxxxxxxxxx>
> > Signed-off-by: Rajiv Andrade <srajiv@xxxxxxxxxxxxxxxxxx>
>
> Yes, this patch is good.
>
> It would also be good to rename num_opens. Note that it is always
> either 0 or 1, and indicates whether someone has opened the chip.
> So 'is_open' may make more sense.

And use atomic_set() instead of atomic_inc().



- James
--
James Morris
<jmorris@xxxxxxxxx>
--
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/