Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212087
b: refs/heads/master
c: 447b1d4
h: refs/heads/master
i:
  212085: ee8c828
  212083: adc3a21
  212079: 734b2c6
v: v3
  • Loading branch information
Daniel Drake authored and H. Peter Anvin committed Oct 13, 2010
1 parent 6fe9ecd commit d63cfdd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf1ebf007911d70a89de9a4a1b36d403e8eb064b
refs/heads/master: 447b1d43ded08c11f4f3d344b4e07e6dcddbef95
24 changes: 24 additions & 0 deletions trunk/arch/x86/kernel/olpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/spinlock.h>
#include <linux/io.h>
#include <linux/string.h>
#include <linux/platform_device.h>

#include <asm/geode.h>
#include <asm/setup.h>
Expand Down Expand Up @@ -223,8 +224,25 @@ static bool __init platform_detect(void)
return true;
}

static int __init add_xo1_platform_devices(void)
{
struct platform_device *pdev;

pdev = platform_device_register_simple("xo1-rfkill", -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);

pdev = platform_device_register_simple("olpc-xo1", -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);

return 0;
}

static int __init olpc_init(void)
{
int r = 0;

if (!olpc_ofw_present() || !platform_detect())
return 0;

Expand All @@ -251,6 +269,12 @@ static int __init olpc_init(void)
olpc_platform_info.boardrev >> 4,
olpc_platform_info.ecver);

if (olpc_platform_info.boardrev < olpc_board_pre(0xd0)) { /* XO-1 */
r = add_xo1_platform_devices();
if (r)
return r;
}

return 0;
}

Expand Down

0 comments on commit d63cfdd

Please sign in to comment.