Re: [PATCH] mfd: wm8994: Return error when device ID mismatch isdetected

From: Mark Brown
Date: Wed Feb 22 2012 - 08:45:34 EST


On Wed, Feb 22, 2012 at 10:24:44AM +0800, Axel Lin wrote:
> We base on wm8994->type to set wm8994->supplies and wm8994->num_supplies.
> But in current code, wm8994->type may be changed when device ID mismatch is
> detected. If we change wm8994->type, then the wm8994->supplies and
> wm8994->num_supplies settings are wrong.
>
> Fix it by return error immediately when device ID mismatch is detected.

No, there are valid use cases for registering as the wrong device. It's
not ideal to have the wrong supply set but it's going to cause more harm
than good to fail hard on this.

Attachment: signature.asc
Description: Digital signature