Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114361
b: refs/heads/master
c: 758a7f7
h: refs/heads/master
i:
  114359: e1f7c90
v: v3
  • Loading branch information
Bjorn Helgaas authored and Linus Torvalds committed Oct 14, 2008
1 parent abb30d1 commit c68a67c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a474aaedac99ba86e28ef6c912a7647c482db6dd
refs/heads/master: 758a7f7bb86b520aadc484f23da85e547b3bf3d8
22 changes: 18 additions & 4 deletions trunk/arch/x86/kernel/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,25 @@ static struct platform_device rtc_device = {
static __init int add_rtc_cmos(void)
{
#ifdef CONFIG_PNP
if (!pnp_platform_devices)
platform_device_register(&rtc_device);
#else
static const char *ids[] __initconst =
{ "PNP0b00", "PNP0b01", "PNP0b02", };
struct pnp_dev *dev;
struct pnp_id *id;
int i;

pnp_for_each_dev(dev) {
for (id = dev->id; id; id = id->next) {
for (i = 0; i < ARRAY_SIZE(ids); i++) {
if (compare_pnp_id(id, ids[i]) != 0)
return 0;
}
}
}
#endif

platform_device_register(&rtc_device);
#endif /* CONFIG_PNP */
dev_info(&rtc_device.dev,
"registered platform RTC device (no PNP device found)\n");
return 0;
}
device_initcall(add_rtc_cmos);

0 comments on commit c68a67c

Please sign in to comment.