[PATCH 2/2] pinmux: add a driver for the U300 pinmux

Linus Walleij linus.walleij at linaro.org
Mon Oct 10 04:17:01 EDT 2011


On Sat, Oct 8, 2011 at 11:09 AM, Barry Song <21cnbao at gmail.com> wrote:
>> +static void __init u300_pmx_dumpregs(struct u300_pmx *upmx)
>> +{
>> +       u16 regval;
>> +       int i;
>> +
>> +       for (i = 0; i < ARRAY_SIZE(u300_pmx_registers); i++) {
>> +               regval = readw(upmx->virtbase + u300_pmx_registers[i]);
>> +               dev_info(upmx->dev, "PMX%u: 0x%04x\n", i, regval);
>> +       }
>> +}
>
> is this a debug information or do you want it to be in mainline?

Debug info, I'll delete it. Not that it hurt, but I'll kill it.

>> +       /* Create state holders etc for this driver */
>> +       upmx = devm_kzalloc(&pdev->dev, sizeof(struct u300_pmx), GFP_KERNEL);
>
> and this would be "devm_kzalloc(&pdev->dev, sizeof(*upmx), GFP_KERNEL); " ?

Same semantic effect, but if you prefer it that way, sure :-)

I've seen both used in the kernel before...

Can I have your Reviewed-by: tag after this?

Linus Walleij



More information about the linux-arm-kernel mailing list