UBUNTU: SAUCE: Unregister input device only if it is registered
[linux-flexiantxendom0-natty.git] / drivers / input / mouse / alps.c
index 668d715..9adff60 100644 (file)
@@ -127,6 +127,11 @@ static const struct dmi_system_id dell_quirk_table[] = {
                        DMI_MATCH(DMI_CHASSIS_TYPE, "9"),
                },
        },
+       {
+               .matches = {
+                       DMI_MATCH(DMI_PRODUCT_NAME, "ZHAOYANG E47"),
+               },
+       },
        { }
 };
 
@@ -740,7 +745,8 @@ static void alps_disconnect(struct psmouse *psmouse)
 
        psmouse_reset(psmouse);
        del_timer_sync(&priv->timer);
-       input_unregister_device(priv->dev2);
+       if (!alps_model_quirk_enabled)
+               input_unregister_device(priv->dev2);
        kfree(priv);
 }