diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 21:00:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 21:00:37 +0000 |
commit | 94ac2ab3fff96814d7460a27a0e9d004abbd4128 (patch) | |
tree | 9a4eb8cc234b540b0f4b93363109cdd37a20540b /drivers/isdn/mISDN | |
parent | Adding debian version 6.8.12-1. (diff) | |
download | linux-94ac2ab3fff96814d7460a27a0e9d004abbd4128.tar.xz linux-94ac2ab3fff96814d7460a27a0e9d004abbd4128.zip |
Merging upstream version 6.9.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/isdn/mISDN')
-rw-r--r-- | drivers/isdn/mISDN/dsp_pipeline.c | 16 | ||||
-rw-r--r-- | drivers/isdn/mISDN/socket.c | 10 |
2 files changed, 15 insertions, 11 deletions
diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c index 09b72f14d4..b4ed0bb8dd 100644 --- a/drivers/isdn/mISDN/dsp_pipeline.c +++ b/drivers/isdn/mISDN/dsp_pipeline.c @@ -31,7 +31,9 @@ struct dsp_element_entry { static LIST_HEAD(dsp_elements); /* sysfs */ -static struct class *elements_class; +static const struct class elements_class = { + .name = "dsp_pipeline", +}; static ssize_t attr_show_args(struct device *dev, struct device_attribute *attr, char *buf) @@ -80,7 +82,7 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem) INIT_LIST_HEAD(&entry->list); entry->elem = elem; - entry->dev.class = elements_class; + entry->dev.class = &elements_class; entry->dev.release = mISDN_dsp_dev_release; dev_set_drvdata(&entry->dev, elem); dev_set_name(&entry->dev, "%s", elem->name); @@ -131,9 +133,11 @@ EXPORT_SYMBOL(mISDN_dsp_element_unregister); int dsp_pipeline_module_init(void) { - elements_class = class_create("dsp_pipeline"); - if (IS_ERR(elements_class)) - return PTR_ERR(elements_class); + int err; + + err = class_register(&elements_class); + if (err) + return err; dsp_hwec_init(); @@ -146,7 +150,7 @@ void dsp_pipeline_module_exit(void) dsp_hwec_exit(); - class_destroy(elements_class); + class_unregister(&elements_class); list_for_each_entry_safe(entry, n, &dsp_elements, list) { list_del(&entry->list); diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index 2776ca5fc3..b215b28cad 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c @@ -401,23 +401,23 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) } static int data_sock_setsockopt(struct socket *sock, int level, int optname, - sockptr_t optval, unsigned int len) + sockptr_t optval, unsigned int optlen) { struct sock *sk = sock->sk; int err = 0, opt = 0; if (*debug & DEBUG_SOCKET) printk(KERN_DEBUG "%s(%p, %d, %x, optval, %d)\n", __func__, sock, - level, optname, len); + level, optname, optlen); lock_sock(sk); switch (optname) { case MISDN_TIME_STAMP: - if (copy_from_sockptr(&opt, optval, sizeof(int))) { - err = -EFAULT; + err = copy_safe_from_sockptr(&opt, sizeof(opt), + optval, optlen); + if (err) break; - } if (opt) _pms(sk)->cmask |= MISDN_TIME_STAMP; |