return client;
}
-void ion_client_destroy(struct ion_client *client)
+static void _ion_client_destroy(struct kref *kref)
{
+ struct ion_client *client = container_of(kref, struct ion_client, ref);
struct ion_device *dev = client->dev;
struct rb_node *n;
kfree(client);
}
-static void _ion_client_destroy(struct kref *kref)
-{
- struct ion_client *client = container_of(kref, struct ion_client, ref);
- ion_client_destroy(client);
-}
-
static void ion_client_get(struct ion_client *client)
{
kref_get(&client->ref);
return kref_put(&client->ref, _ion_client_destroy);
}
+void ion_client_destroy(struct ion_client *client)
+{
+ ion_client_put(client);
+}
+
static int ion_share_release(struct inode *inode, struct file* file)
{
struct ion_buffer *buffer = file->private_data;