Manual merge with Linus.
Dmitry Torokhov [Sun, 2 Apr 2006 05:08:05 +0000 (00:08 -0500)]
Conflicts:
arch/powerpc/kernel/setup-common.c
drivers/input/keyboard/hil_kbd.c
drivers/input/mouse/hil_ptr.c

12 files changed:
1  2 
arch/alpha/kernel/setup.c
arch/i386/kernel/setup.c
arch/mips/Kconfig
arch/powerpc/kernel/setup-common.c
drivers/Makefile
drivers/input/input.c
drivers/input/keyboard/hil_kbd.c
drivers/input/mouse/hil_ptr.c
drivers/input/serio/hil_mlc.c
include/linux/gameport.h
include/linux/input.h
include/linux/serio.h

Simple merge
Simple merge
Simple merge
@@@ -471,25 -462,33 +463,56 @@@ static int __init early_xmon(char *p
  early_param("xmon", early_xmon);
  #endif
  
 +static __init int add_pcspkr(void)
 +{
 +      struct device_node *np;
 +      struct platform_device *pd;
 +      int ret;
 +
 +      np = of_find_compatible_node(NULL, NULL, "pnpPNP,100");
 +      of_node_put(np);
 +      if (!np)
 +              return -ENODEV;
 +
 +      pd = platform_device_alloc("pcspkr", -1);
 +      if (!pd)
 +              return -ENOMEM;
 +
 +      ret = platform_device_add(pd);
 +      if (ret)
 +              platform_device_put(pd);
 +
 +      return ret;
 +}
 +device_initcall(add_pcspkr);
++
+ void probe_machine(void)
+ {
+       extern struct machdep_calls __machine_desc_start;
+       extern struct machdep_calls __machine_desc_end;
+       /*
+        * Iterate all ppc_md structures until we find the proper
+        * one for the current machine type
+        */
+       DBG("Probing machine type ...\n");
+       for (machine_id = &__machine_desc_start;
+            machine_id < &__machine_desc_end;
+            machine_id++) {
+               DBG("  %s ...", machine_id->name);
+               memcpy(&ppc_md, machine_id, sizeof(struct machdep_calls));
+               if (ppc_md.probe()) {
+                       DBG(" match !\n");
+                       break;
+               }
+               DBG("\n");
+       }
+       /* What can we do if we didn't find ? */
+       if (machine_id >= &__machine_desc_end) {
+               DBG("No suitable machine found !\n");
+               for (;;);
+       }
+       printk(KERN_INFO "Using %s machine description\n", ppc_md.name);
+ }
Simple merge
Simple merge
@@@ -250,12 -250,16 +250,19 @@@ static int hil_kbd_connect(struct seri
        struct hil_kbd  *kbd;
        uint8_t         did, *idd;
        int             i;
--      
++
        kbd = kzalloc(sizeof(*kbd), GFP_KERNEL);
        if (!kbd)
                return -ENOMEM;
  
-       if (serio_open(serio, drv)) goto bail0;
+       kbd->dev = input_allocate_device();
 -      if (!kbd->dev) goto bail1;
++      if (!kbd->dev)
++              goto bail0;
++
+       kbd->dev->private = kbd;
 -      if (serio_open(serio, drv)) goto bail0;
++      if (serio_open(serio, drv))
++              goto bail1;
  
        serio_set_drvdata(serio, kbd);
        kbd->serio = serio;
@@@ -248,12 -248,14 +248,17 @@@ static int hil_ptr_connect(struct seri
        if (!(ptr = kzalloc(sizeof(struct hil_ptr), GFP_KERNEL)))
                return -ENOMEM;
  
-       if (serio_open(serio, driver))
+       ptr->dev = input_allocate_device();
 -      if (!ptr->dev) goto bail0;
++      if (!ptr->dev)
 +              goto bail0;
 +
+       ptr->dev->private = ptr;
 -      if (serio_open(serio, driver)) goto bail1;
++      if (serio_open(serio, driver))
++              goto bail1;
        serio_set_drvdata(serio, ptr);
        ptr->serio = serio;
-       ptr->dev.private = ptr;
  
        init_MUTEX_LOCKED(&(ptr->sem));
  
Simple merge
Simple merge
Simple merge
Simple merge