Re: [PATCH v3] Regulator: Add Anatop regulator driver
From: Mark Brown
Date: Tue Dec 27 2011 - 05:52:13 EST
On Tue, Dec 27, 2011 at 06:16:34PM +0800, Ying-Chun Liu (PaulLiu) wrote:
> + initdata = pdev->dev.platform_data;
> + sreg = initdata->driver_data;
> +
> + spin_lock_init(&sreg->lock);
You don't actually appear to use this, though it looks like you need to
do something to protect against simultaneous access to the registers.
> +struct anatop_regulator {
> + struct regulator_desc regulator;
> + struct anatop_regulator *parent;
> + struct anatop_regulator_data *rdata;
> + struct completion done;
> +
> + spinlock_t lock;
> + struct notifier_block nb;
You aren't using half the things in this structure.
--
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/