Commit 6ab1ce4d authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: operation: remove gb_operation_destroy

Remove legacy interface to "destroy" operations, which is now just a
wrapper for gb_operation_put.

The old interface name hides the fact that all operations are refcounted
and may live on even after having "destroyed" them.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 58c85123
...@@ -92,7 +92,8 @@ static int gb_hid_set_report(struct gb_hid *ghid, u8 report_type, u8 report_id, ...@@ -92,7 +92,8 @@ static int gb_hid_set_report(struct gb_hid *ghid, u8 report_type, u8 report_id,
ret = len; ret = len;
} }
gb_operation_destroy(operation); gb_operation_put(operation);
return ret; return ret;
} }
......
...@@ -218,7 +218,8 @@ static int gb_i2c_transfer_operation(struct gb_i2c_device *gb_i2c_dev, ...@@ -218,7 +218,8 @@ static int gb_i2c_transfer_operation(struct gb_i2c_device *gb_i2c_dev,
} else if (!gb_i2c_expected_transfer_error(ret)) { } else if (!gb_i2c_expected_transfer_error(ret)) {
pr_err("transfer operation failed (%d)\n", ret); pr_err("transfer operation failed (%d)\n", ret);
} }
gb_operation_destroy(operation);
gb_operation_put(operation);
return ret; return ret;
} }
......
...@@ -402,7 +402,8 @@ static int gb_loopback_operation_sync(struct gb_loopback *gb, int type, ...@@ -402,7 +402,8 @@ static int gb_loopback_operation_sync(struct gb_loopback *gb, int type,
response_size); response_size);
} }
} }
gb_operation_destroy(operation);
gb_operation_put(operation);
error: error:
do_gettimeofday(&te); do_gettimeofday(&te);
......
...@@ -1035,7 +1035,8 @@ int gb_operation_sync_timeout(struct gb_connection *connection, int type, ...@@ -1035,7 +1035,8 @@ int gb_operation_sync_timeout(struct gb_connection *connection, int type,
response_size); response_size);
} }
} }
gb_operation_destroy(operation);
gb_operation_put(operation);
return ret; return ret;
} }
......
...@@ -131,10 +131,6 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection, ...@@ -131,10 +131,6 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection,
gfp_t gfp); gfp_t gfp);
void gb_operation_get(struct gb_operation *operation); void gb_operation_get(struct gb_operation *operation);
void gb_operation_put(struct gb_operation *operation); void gb_operation_put(struct gb_operation *operation);
static inline void gb_operation_destroy(struct gb_operation *operation)
{
gb_operation_put(operation);
}
bool gb_operation_response_alloc(struct gb_operation *operation, bool gb_operation_response_alloc(struct gb_operation *operation,
size_t response_size, gfp_t gfp); size_t response_size, gfp_t gfp);
......
...@@ -156,7 +156,8 @@ static int gb_spi_transfer_one_message(struct spi_master *master, ...@@ -156,7 +156,8 @@ static int gb_spi_transfer_one_message(struct spi_master *master,
} else { } else {
pr_err("transfer operation failed (%d)\n", ret); pr_err("transfer operation failed (%d)\n", ret);
} }
gb_operation_destroy(operation);
gb_operation_put(operation);
msg->actual_length = len; msg->actual_length = len;
msg->status = 0; msg->status = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment