aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/cros_ec_spi.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2013-12-09 06:36:10 -0500
committerLee Jones <lee.jones@linaro.org>2014-01-21 03:28:05 -0500
commitdaf93d2287ff8eb4a2f28224275fb02d623df2ab (patch)
tree1b241f60a8331fc95227a6442ed40245dd00d92d /drivers/mfd/cros_ec_spi.c
parentfcfccdb22f340f9ae354f39793c206c7ead190dd (diff)
mfd: cros ec: spi: Use 0 instead of '\0' consistently
memset() was being called with the second parameter set to '\0', which is equivalent but longer than the more canonical 0. Update the code to use the latter variant consistently across the driver. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/cros_ec_spi.c')
-rw-r--r--drivers/mfd/cros_ec_spi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c
index d64d88a9e247..005403643539 100644
--- a/drivers/mfd/cros_ec_spi.c
+++ b/drivers/mfd/cros_ec_spi.c
@@ -108,7 +108,7 @@ static int cros_ec_spi_receive_response(struct cros_ec_device *ec_dev,
108 /* Receive data until we see the header byte */ 108 /* Receive data until we see the header byte */
109 deadline = jiffies + msecs_to_jiffies(EC_MSG_DEADLINE_MS); 109 deadline = jiffies + msecs_to_jiffies(EC_MSG_DEADLINE_MS);
110 do { 110 do {
111 memset(&trans, '\0', sizeof(trans)); 111 memset(&trans, 0, sizeof(trans));
112 trans.cs_change = 1; 112 trans.cs_change = 1;
113 trans.rx_buf = ptr = ec_dev->din; 113 trans.rx_buf = ptr = ec_dev->din;
114 trans.len = EC_MSG_PREAMBLE_COUNT; 114 trans.len = EC_MSG_PREAMBLE_COUNT;
@@ -160,7 +160,7 @@ static int cros_ec_spi_receive_response(struct cros_ec_device *ec_dev,
160 dev_dbg(ec_dev->dev, "loop, todo=%d, need_len=%d, ptr=%zd\n", 160 dev_dbg(ec_dev->dev, "loop, todo=%d, need_len=%d, ptr=%zd\n",
161 todo, need_len, ptr - ec_dev->din); 161 todo, need_len, ptr - ec_dev->din);
162 162
163 memset(&trans, '\0', sizeof(trans)); 163 memset(&trans, 0, sizeof(trans));
164 trans.cs_change = 1; 164 trans.cs_change = 1;
165 trans.rx_buf = ptr; 165 trans.rx_buf = ptr;
166 trans.len = todo; 166 trans.len = todo;
@@ -220,7 +220,7 @@ static int cros_ec_command_spi_xfer(struct cros_ec_device *ec_dev,
220 220
221 /* Transmit phase - send our message */ 221 /* Transmit phase - send our message */
222 debug_packet(ec_dev->dev, "out", ec_dev->dout, len); 222 debug_packet(ec_dev->dev, "out", ec_dev->dout, len);
223 memset(&trans, '\0', sizeof(trans)); 223 memset(&trans, 0, sizeof(trans));
224 trans.tx_buf = ec_dev->dout; 224 trans.tx_buf = ec_dev->dout;
225 trans.len = len; 225 trans.len = len;
226 trans.cs_change = 1; 226 trans.cs_change = 1;