Re: [PATCH 2/3] regulator: s5m8767: Fix using wrong dev argument atvarious places

From: Axel Lin
Date: Sun Feb 10 2013 - 05:15:49 EST

2013/2/8, Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>:
> On Wed, Feb 06, 2013 at 10:56:52AM +0800, Axel Lin wrote:
>> Use &pdev->dev rather than iodev->dev for dev_err(), dev_warn() and
>> dev_info().
> It's not clear to me that this is actually an improvement, the pdev is
> mostly just an internal Linux implementation detail so it's common to
> use the physical device for MFD logging in order to help the user
> understand what's causing the log message.

My understanding is if people (at least it's me) found some error message
in dmesg, they usually grep the driver that emit the error message.
If we use the parent device here, people might grep wrong files.

>> Use &pdev->dev rather than iodev->dev for devm_kzalloc() and
>> of_get_regulator_init_data(), this fixes memory leak.
> This is a good fix though. This sort of thing is one reason for
> splitting out unrelated changes.

Ok. I'll resend the patchs (for one topic a patch) a few days latter.
(It's Chinese New Year vacation in Taiwan now.)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at