]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/platform/chrome/cros_ec_lpc.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[linux.git] / drivers / platform / chrome / cros_ec_lpc.c
index bdd77ce45f0512494fa775dba51fc8655be1a8c4..f9a245465fd099f64037711523f7b0903b9b226d 100644 (file)
@@ -166,19 +166,9 @@ static int cros_ec_cmd_xfer_lpc(struct cros_ec_device *ec,
 
        /* Check result */
        msg->result = inb(EC_LPC_ADDR_HOST_DATA);
-
-       switch (msg->result) {
-       case EC_RES_SUCCESS:
-               break;
-       case EC_RES_IN_PROGRESS:
-               ret = -EAGAIN;
-               dev_dbg(ec->dev, "command 0x%02x in progress\n",
-                       msg->command);
+       ret = cros_ec_check_result(ec, msg);
+       if (ret)
                goto done;
-       default:
-               dev_dbg(ec->dev, "command 0x%02x returned %d\n",
-                       msg->command, msg->result);
-       }
 
        /* Read back args */
        args.flags = inb(EC_LPC_ADDR_HOST_ARGS);
@@ -329,6 +319,13 @@ static struct dmi_system_id cros_ec_lpc_dmi_table[] __initdata = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "Link"),
                },
        },
+       {
+               /* x86-samus, the Chromebook Pixel 2. */
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Samus"),
+               },
+       },
        {
                /* x86-peppy, the Acer C720 Chromebook. */
                .matches = {