Commit 6507cced authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: FIXME/XXX removals: We have proper reference counting now

Now that we have proper reference counting for modules, interfaces, and
connections, no need to worry about grabbing a pointer to your "parent"
structure, all is good.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 4d980989
...@@ -369,7 +369,7 @@ int gb_battery_device_init(struct gb_connection *connection) ...@@ -369,7 +369,7 @@ int gb_battery_device_init(struct gb_connection *connection)
if (!gb) if (!gb)
return -ENOMEM; return -ENOMEM;
gb->connection = connection; // FIXME refcount! gb->connection = connection;
connection->private = gb; connection->private = gb;
/* Check the version */ /* Check the version */
......
...@@ -179,7 +179,7 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface, ...@@ -179,7 +179,7 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface,
return NULL; return NULL;
} }
connection->interface = interface; /* XXX refcount? */ connection->interface = interface;
connection->interface_cport_id = cport_id; connection->interface_cport_id = cport_id;
connection->protocol = protocol; connection->protocol = protocol;
connection->state = GB_CONNECTION_STATE_DISABLED; connection->state = GB_CONNECTION_STATE_DISABLED;
......
...@@ -61,7 +61,7 @@ gb_interface_create(struct gb_module *gmod, u8 interface_id) ...@@ -61,7 +61,7 @@ gb_interface_create(struct gb_module *gmod, u8 interface_id)
if (!interface) if (!interface)
return NULL; return NULL;
interface->gmod = gmod; /* XXX refcount? */ interface->gmod = gmod;
interface->id = interface_id; interface->id = interface_id;
interface->device_id = 0xff; /* Invalid device id to start with */ interface->device_id = 0xff; /* Invalid device id to start with */
INIT_LIST_HEAD(&interface->connections); INIT_LIST_HEAD(&interface->connections);
......
...@@ -349,7 +349,7 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection, ...@@ -349,7 +349,7 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection,
operation = kmem_cache_zalloc(gb_operation_cache, gfp_flags); operation = kmem_cache_zalloc(gb_operation_cache, gfp_flags);
if (!operation) if (!operation)
return NULL; return NULL;
operation->connection = connection; /* XXX refcount? */ operation->connection = connection;
operation->request = gb_operation_gbuf_create(operation, type, operation->request = gb_operation_gbuf_create(operation, type,
request_size, request_size,
......
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