summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-09-26 17:59:15 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2015-09-29 19:14:26 +0200
commit6ab1ce4d542ea1b5ffa40321e021d95de47880ea (patch)
treeb383b7003da3bdf175611b6538fb5621d43d8d89 /drivers/staging/greybus
parent58c85123d9a1801af2558a0c925d90fe1599c27f (diff)
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: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r--drivers/staging/greybus/hid.c3
-rw-r--r--drivers/staging/greybus/i2c.c3
-rw-r--r--drivers/staging/greybus/loopback.c3
-rw-r--r--drivers/staging/greybus/operation.c3
-rw-r--r--drivers/staging/greybus/operation.h4
-rw-r--r--drivers/staging/greybus/spi.c3
6 files changed, 10 insertions, 9 deletions
diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c
index 0044b844c3e9..a2f0612076d5 100644
--- a/drivers/staging/greybus/hid.c
+++ b/drivers/staging/greybus/hid.c
@@ -92,7 +92,8 @@ static int gb_hid_set_report(struct gb_hid *ghid, u8 report_type, u8 report_id,
ret = len;
}
- gb_operation_destroy(operation);
+ gb_operation_put(operation);
+
return ret;
}
diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c
index 75b92d683036..bf6d11b36b83 100644
--- a/drivers/staging/greybus/i2c.c
+++ b/drivers/staging/greybus/i2c.c
@@ -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)) {
pr_err("transfer operation failed (%d)\n", ret);
}
- gb_operation_destroy(operation);
+
+ gb_operation_put(operation);
return ret;
}
diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index 5a6354eb4ea9..5cbb8cb7fd9b 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -402,7 +402,8 @@ static int gb_loopback_operation_sync(struct gb_loopback *gb, int type,
response_size);
}
}
- gb_operation_destroy(operation);
+
+ gb_operation_put(operation);
error:
do_gettimeofday(&te);
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c
index d159831f1421..fae6ee9071df 100644
--- a/drivers/staging/greybus/operation.c
+++ b/drivers/staging/greybus/operation.c
@@ -1035,7 +1035,8 @@ int gb_operation_sync_timeout(struct gb_connection *connection, int type,
response_size);
}
}
- gb_operation_destroy(operation);
+
+ gb_operation_put(operation);
return ret;
}
diff --git a/drivers/staging/greybus/operation.h b/drivers/staging/greybus/operation.h
index 16488d016943..0f44ec844106 100644
--- a/drivers/staging/greybus/operation.h
+++ b/drivers/staging/greybus/operation.h
@@ -131,10 +131,6 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection,
gfp_t gfp);
void gb_operation_get(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,
size_t response_size, gfp_t gfp);
diff --git a/drivers/staging/greybus/spi.c b/drivers/staging/greybus/spi.c
index e5d216646b9c..393f28ad099b 100644
--- a/drivers/staging/greybus/spi.c
+++ b/drivers/staging/greybus/spi.c
@@ -156,7 +156,8 @@ static int gb_spi_transfer_one_message(struct spi_master *master,
} else {
pr_err("transfer operation failed (%d)\n", ret);
}
- gb_operation_destroy(operation);
+
+ gb_operation_put(operation);
msg->actual_length = len;
msg->status = 0;