]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: FIXME/XXX removals: We have proper reference counting now
authorGreg Kroah-Hartman <greg@kroah.com>
Mon, 27 Oct 2014 09:58:54 +0000 (17:58 +0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 27 Oct 2014 09:58:54 +0000 (17:58 +0800)
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: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/battery-gb.c
drivers/staging/greybus/connection.c
drivers/staging/greybus/interface.c
drivers/staging/greybus/operation.c

index 592b68d5115a585ee7666c676d7866107032b145..185fa2c4b55f90d9bfa4259309796f12e0c8b3d1 100644 (file)
@@ -369,7 +369,7 @@ int gb_battery_device_init(struct gb_connection *connection)
        if (!gb)
                return -ENOMEM;
 
-       gb->connection = connection;    // FIXME refcount!
+       gb->connection = connection;
        connection->private = gb;
 
        /* Check the version */
index 2d3421f6aa10dc5f06a0a6e526f01ca39d2cf24d..722bee4579eaf2278ee996969a11bf894eeaee3f 100644 (file)
@@ -179,7 +179,7 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface,
                return NULL;
        }
 
-       connection->interface = interface;      /* XXX refcount? */
+       connection->interface = interface;
        connection->interface_cport_id = cport_id;
        connection->protocol = protocol;
        connection->state = GB_CONNECTION_STATE_DISABLED;
index a7375a2809d534cdbeeaec951440150a1e721999..163cdc439e0c73848f7b85257017bccc8e484093 100644 (file)
@@ -61,7 +61,7 @@ gb_interface_create(struct gb_module *gmod, u8 interface_id)
        if (!interface)
                return NULL;
 
-       interface->gmod = gmod;         /* XXX refcount? */
+       interface->gmod = gmod;
        interface->id = interface_id;
        interface->device_id = 0xff;    /* Invalid device id to start with */
        INIT_LIST_HEAD(&interface->connections);
index 9b889b169bf50a6915d5aafdf20fec0261f30305..df3a50227625eba5ab8d2dd74a6708fcc6a99768 100644 (file)
@@ -349,7 +349,7 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection,
        operation = kmem_cache_zalloc(gb_operation_cache, gfp_flags);
        if (!operation)
                return NULL;
-       operation->connection = connection;             /* XXX refcount? */
+       operation->connection = connection;
 
        operation->request = gb_operation_gbuf_create(operation, type,
                                                        request_size,