Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: ziirave_wdt: Drop ziirave_firm_write_block_data()

There's only one user of ziirave_firm_write_block_data(), so we may as
well inline it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Rick Ramstetter <rick@anteaterllc.com>
Cc: linux-watchdog@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20190812200906.31344-22-andrew.smirnov@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Andrey Smirnov and committed by
Wim Van Sebroeck
08c913fe fa0d2f44

+9 -22
+9 -22
drivers/watchdog/ziirave_wdt.c
··· 197 197 sizeof(address), address); 198 198 } 199 199 200 - static int ziirave_firm_write_block_data(struct watchdog_device *wdd, 201 - u8 command, u8 length, const u8 *data, 202 - bool wait_for_ack) 203 - { 204 - struct i2c_client *client = to_i2c_client(wdd->parent); 205 - int ret; 206 - 207 - ret = i2c_smbus_write_block_data(client, command, length, data); 208 - if (ret) { 209 - dev_err(&client->dev, 210 - "Failed to send command 0x%02x: %d\n", command, ret); 211 - return ret; 212 - } 213 - 214 - if (wait_for_ack) 215 - ret = ziirave_firm_read_ack(wdd); 216 - 217 - return ret; 218 - } 219 - 220 200 static bool ziirave_firm_addr_readonly(u32 addr) 221 201 { 222 202 return addr < ZIIRAVE_FIRM_FLASH_MEMORY_START || ··· 253 273 checksum += packet[i]; 254 274 packet[ZIIRAVE_FIRM_PKT_TOTAL_SIZE - 1] = checksum; 255 275 256 - ret = ziirave_firm_write_block_data(wdd, ZIIRAVE_CMD_DOWNLOAD_PACKET, 257 - sizeof(packet), packet, true); 276 + ret = i2c_smbus_write_block_data(client, ZIIRAVE_CMD_DOWNLOAD_PACKET, 277 + sizeof(packet), packet); 278 + if (ret) { 279 + dev_err(&client->dev, 280 + "Failed to send DOWNLOAD_PACKET: %d\n", ret); 281 + return ret; 282 + } 283 + 284 + ret = ziirave_firm_read_ack(wdd); 258 285 if (ret) 259 286 dev_err(&client->dev, 260 287 "Failed to write firmware packet at address 0x%04x: %d\n",