Re: [PATCH] x86: enable rtc-efi

From: Jan Beulich
Date: Wed Jul 06 2011 - 03:09:53 EST


>>> On 05.07.11 at 20:29, Matthew Garrett <mjg59@xxxxxxxxxxxxx> wrote:
> On Tue, Jul 05, 2011 at 08:38:51AM +0100, Jan Beulich wrote:
>> Besides a Kconfig change this just requires creating a respective
>> platform device.
>
> Couple of other issues:
>
>> +static struct platform_device rtc_efi_dev = {
>> + .name = "rtc-efi",
>> + .id = -1,
>> +};
>
> You haven't removed this from the IA64 code. Isn't that going to result
> in registering the same device twice?

How would code under arch/ia64/ and code under arch/x86/ ever
manage to register the same device twice?

>> +static int __init rtc_init(void)
>> +{
>> + if (efi_enabled && platform_device_register(&rtc_efi_dev) < 0)
>> + printk(KERN_ERR "unable to register rtc device...\n");
>
> Ought to -ENODEV if efi isn't present? The error message should also be
> more verbose.

I would agree on the -ENODEV part, but the error message is what
the original ia64 code (which I simply copied over and modified
slightly) has, so if a change is needed it ought to be done there first
I would think. Additionally I can't really see what meaningful addition
to the error message you envision.

Jan

--
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/