mfd: cros_ec: Use a zero-length array for command data
[cascardo/linux.git] / include / linux / mfd / cros_ec.h
index 324a346..7eee38a 100644 (file)
@@ -42,8 +42,7 @@ enum {
  * @outsize: Outgoing length in bytes
  * @insize: Max number of bytes to accept from EC
  * @result: EC's response to the command (separate from communication failure)
- * @outdata: Outgoing data to EC
- * @indata: Where to put the incoming data from EC
+ * @data: Where to put the incoming data from EC and outgoing data to EC
  */
 struct cros_ec_command {
        uint32_t version;
@@ -51,8 +50,7 @@ struct cros_ec_command {
        uint32_t outsize;
        uint32_t insize;
        uint32_t result;
-       uint8_t outdata[EC_PROTO2_MAX_PARAM_SIZE];
-       uint8_t indata[EC_PROTO2_MAX_PARAM_SIZE];
+       uint8_t data[0];
 };
 
 /**
@@ -85,7 +83,6 @@ struct cros_ec_command {
  * to using dword.
  * @din_size: size of din buffer to allocate (zero to use static din)
  * @dout_size: size of dout buffer to allocate (zero to use static dout)
- * @parent: pointer to parent device (e.g. i2c or spi device)
  * @wake_enabled: true if this device can wake the system from sleep
  * @cmd_xfer: send command to EC and get response
  *     Returns the number of bytes received if the communication succeeded, but
@@ -113,7 +110,6 @@ struct cros_ec_device {
        uint8_t *dout;
        int din_size;
        int dout_size;
-       struct device *parent;
        bool wake_enabled;
        int (*cmd_xfer)(struct cros_ec_device *ec,
                        struct cros_ec_command *msg);