summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/sdio.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2016-03-22 14:30:35 -0400
committerGreg Kroah-Hartman <gregkh@google.com>2016-03-22 16:47:28 -0400
commit0ec306324423444d3ee0222708ef9de7f5586b93 (patch)
tree3d6ad3817d35074b12b8d92162437e03f6ce2372 /drivers/staging/greybus/sdio.c
parent418f3dab841f85e24beb6e30858cafce5cf1f87c (diff)
greybus: convert drivers to use connection->private set/get
This converts all drivers to use the gb_connection_get_data() and gb_connection_set_data() functions to make it a bit more explicit as to what is going on. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/sdio.c')
-rw-r--r--drivers/staging/greybus/sdio.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/staging/greybus/sdio.c b/drivers/staging/greybus/sdio.c
index 9a20f0e0363d..d4cbcb972e94 100644
--- a/drivers/staging/greybus/sdio.c
+++ b/drivers/staging/greybus/sdio.c
@@ -201,15 +201,14 @@ static int _gb_sdio_process_events(struct gb_sdio_host *host, u8 event)
static int gb_sdio_event_recv(u8 type, struct gb_operation *op)
{
- struct gb_connection *connection = op->connection;
- struct gb_sdio_host *host = connection->private;
+ struct gb_sdio_host *host = gb_connection_get_data(op->connection);
struct gb_message *request;
struct gb_sdio_event_request *payload;
int ret = 0;
u8 event;
if (type != GB_SDIO_TYPE_EVENT) {
- dev_err(&connection->bundle->dev,
+ dev_err(mmc_dev(host->mmc),
"unsupported unsolicited event: %u\n", type);
return -EINVAL;
}
@@ -723,7 +722,7 @@ static int gb_sdio_connection_init(struct gb_connection *connection)
host->removed = true;
host->connection = connection;
- connection->private = host;
+ gb_connection_set_data(connection, host);
ret = gb_sdio_get_caps(host);
if (ret < 0)
@@ -767,7 +766,7 @@ free_work:
free_buffer:
kfree(host->xfer_buffer);
free_mmc:
- connection->private = NULL;
+ gb_connection_set_data(connection, NULL);
mmc_free_host(mmc);
return ret;
@@ -776,7 +775,7 @@ free_mmc:
static void gb_sdio_connection_exit(struct gb_connection *connection)
{
struct mmc_host *mmc;
- struct gb_sdio_host *host = connection->private;
+ struct gb_sdio_host *host = gb_connection_get_data(connection);
if (!host)
return;
@@ -784,7 +783,7 @@ static void gb_sdio_connection_exit(struct gb_connection *connection)
mutex_lock(&host->lock);
host->removed = true;
mmc = host->mmc;
- connection->private = NULL;
+ gb_connection_set_data(connection, NULL);
mutex_unlock(&host->lock);
flush_workqueue(host->mrq_workqueue);