Re: [PATCH 2/4] PM: Reference counting of power.subsys_data

Pavel Machek
2011-08-23T20:10:09Z

Hi!
> Since the power.subsys_data device field will be used by multiple
> filesystems, introduce a reference counting mechanism for it to avoid
> freeing it prematurely or changing its value at a wrong time.
>
> Make the PM clocks management code that currently is the only user of
> power.subsys_data use the new reference counting.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> drivers/base/power/Makefile | 2
> drivers/base/power/clock_ops.c | 24 ++---------
> drivers/base/power/common.c | 86 +++++++++++++++++++++++++++++++++++++++++
> include/linux/pm.h | 3 +
> 4 files changed, 95 insertions(+), 20 deletions(-)
>
> Index: linux-2.6/drivers/base/power/common.c
> ===================================================================
> --- /dev/null
> +++ linux-2.6/drivers/base/power/common.c
> @@ -0,0 +1,86 @@
> +/*
> + * drivers/base/power/common.c - Common device power management code.
> + *
> + * Copyright (C) 2011 Rafael J. Wysocki <rjw@sisk.pl>, Renesas Electronics Corp.

This looks like you now work for Renesas....?

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html