summaryrefslogtreecommitdiff
path: root/drivers/most
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/most')
-rw-r--r--drivers/most/core.c14
-rw-r--r--drivers/most/most_cdev.c6
-rw-r--r--drivers/most/most_usb.c6
3 files changed, 13 insertions, 13 deletions
diff --git a/drivers/most/core.c b/drivers/most/core.c
index e4412c7d25b0..a635d5082ebb 100644
--- a/drivers/most/core.c
+++ b/drivers/most/core.c
@@ -491,7 +491,7 @@ static int print_links(struct device *dev, void *data)
return 0;
}
-static int most_match(struct device *dev, struct device_driver *drv)
+static int most_match(struct device *dev, const struct device_driver *drv)
{
if (!strcmp(dev_name(dev), "most"))
return 0;
@@ -499,7 +499,7 @@ static int most_match(struct device *dev, struct device_driver *drv)
return 1;
}
-static struct bus_type mostbus = {
+static const struct bus_type mostbus = {
.name = "most",
.match = most_match,
};
@@ -1286,7 +1286,7 @@ int most_register_interface(struct most_interface *iface)
!iface->poison_channel || (iface->num_channels > MAX_CHANNELS))
return -EINVAL;
- id = ida_simple_get(&mdev_id, 0, 0, GFP_KERNEL);
+ id = ida_alloc(&mdev_id, GFP_KERNEL);
if (id < 0) {
dev_err(iface->dev, "Failed to allocate device ID\n");
return id;
@@ -1294,7 +1294,7 @@ int most_register_interface(struct most_interface *iface)
iface->p = kzalloc(sizeof(*iface->p), GFP_KERNEL);
if (!iface->p) {
- ida_simple_remove(&mdev_id, id);
+ ida_free(&mdev_id, id);
return -ENOMEM;
}
@@ -1308,7 +1308,7 @@ int most_register_interface(struct most_interface *iface)
dev_err(iface->dev, "Failed to register interface device\n");
kfree(iface->p);
put_device(iface->dev);
- ida_simple_remove(&mdev_id, id);
+ ida_free(&mdev_id, id);
return -ENOMEM;
}
@@ -1366,7 +1366,7 @@ err_free_resources:
}
kfree(iface->p);
device_unregister(iface->dev);
- ida_simple_remove(&mdev_id, id);
+ ida_free(&mdev_id, id);
return -ENOMEM;
}
EXPORT_SYMBOL_GPL(most_register_interface);
@@ -1397,7 +1397,7 @@ void most_deregister_interface(struct most_interface *iface)
device_unregister(&c->dev);
}
- ida_simple_remove(&mdev_id, iface->p->dev_id);
+ ida_free(&mdev_id, iface->p->dev_id);
kfree(iface->p);
device_unregister(iface->dev);
}
diff --git a/drivers/most/most_cdev.c b/drivers/most/most_cdev.c
index 3ed8f461e01e..b9423f82373d 100644
--- a/drivers/most/most_cdev.c
+++ b/drivers/most/most_cdev.c
@@ -100,7 +100,7 @@ static void destroy_cdev(struct comp_channel *c)
static void destroy_channel(struct comp_channel *c)
{
- ida_simple_remove(&comp.minor_id, MINOR(c->devno));
+ ida_free(&comp.minor_id, MINOR(c->devno));
kfifo_free(&c->fifo);
kfree(c);
}
@@ -425,7 +425,7 @@ static int comp_probe(struct most_interface *iface, int channel_id,
if (c)
return -EEXIST;
- current_minor = ida_simple_get(&comp.minor_id, 0, 0, GFP_KERNEL);
+ current_minor = ida_alloc(&comp.minor_id, GFP_KERNEL);
if (current_minor < 0)
return current_minor;
@@ -472,7 +472,7 @@ err_del_cdev_and_free_channel:
err_free_c:
kfree(c);
err_remove_ida:
- ida_simple_remove(&comp.minor_id, current_minor);
+ ida_free(&comp.minor_id, current_minor);
return retval;
}
diff --git a/drivers/most/most_usb.c b/drivers/most/most_usb.c
index 485d5ca39951..cf5be9c449a5 100644
--- a/drivers/most/most_usb.c
+++ b/drivers/most/most_usb.c
@@ -257,7 +257,7 @@ static int hdm_poison_channel(struct most_interface *iface, int channel)
mdev->padding_active[channel] = false;
if (mdev->conf[channel].data_type == MOST_CH_ASYNC) {
- del_timer_sync(&mdev->link_stat_timer);
+ timer_delete_sync(&mdev->link_stat_timer);
cancel_work_sync(&mdev->poll_work_obj);
}
mutex_unlock(&mdev->io_mutex);
@@ -667,7 +667,7 @@ static void hdm_request_netinfo(struct most_interface *iface, int channel,
*/
static void link_stat_timer_handler(struct timer_list *t)
{
- struct most_dev *mdev = from_timer(mdev, t, link_stat_timer);
+ struct most_dev *mdev = timer_container_of(mdev, t, link_stat_timer);
schedule_work(&mdev->poll_work_obj);
mdev->link_stat_timer.expires = jiffies + (2 * HZ);
@@ -1115,7 +1115,7 @@ static void hdm_disconnect(struct usb_interface *interface)
mdev->usb_device = NULL;
mutex_unlock(&mdev->io_mutex);
- del_timer_sync(&mdev->link_stat_timer);
+ timer_delete_sync(&mdev->link_stat_timer);
cancel_work_sync(&mdev->poll_work_obj);
if (mdev->dci)