diff options
Diffstat (limited to 'drivers/hsi')
-rw-r--r-- | drivers/hsi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/hsi/clients/Kconfig | 2 | ||||
-rw-r--r-- | drivers/hsi/clients/cmt_speech.c | 15 | ||||
-rw-r--r-- | drivers/hsi/clients/nokia-modem.c | 4 | ||||
-rw-r--r-- | drivers/hsi/clients/ssi_protocol.c | 12 | ||||
-rw-r--r-- | drivers/hsi/controllers/Kconfig | 2 | ||||
-rw-r--r-- | drivers/hsi/controllers/omap_ssi_core.c | 7 | ||||
-rw-r--r-- | drivers/hsi/controllers/omap_ssi_port.c | 8 | ||||
-rw-r--r-- | drivers/hsi/hsi_core.c | 6 |
9 files changed, 29 insertions, 29 deletions
diff --git a/drivers/hsi/Kconfig b/drivers/hsi/Kconfig index bcddb06ef038..42da4c235508 100644 --- a/drivers/hsi/Kconfig +++ b/drivers/hsi/Kconfig @@ -4,7 +4,7 @@ # menuconfig HSI tristate "HSI support" - ---help--- + help The "High speed synchronous Serial Interface" is synchronous serial interface used mainly to connect application engines and cellular modems. diff --git a/drivers/hsi/clients/Kconfig b/drivers/hsi/clients/Kconfig index 3c423a27f0ae..80f60cb28c98 100644 --- a/drivers/hsi/clients/Kconfig +++ b/drivers/hsi/clients/Kconfig @@ -35,7 +35,7 @@ config SSI_PROTOCOL config HSI_CHAR tristate "HSI/SSI character driver" depends on HSI - ---help--- + help If you say Y here, you will enable the HSI/SSI character driver. This driver provides a simple character device interface for serial communication with the cellular modem over HSI/SSI bus. diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c index 9eec970cdfa5..8069f795c864 100644 --- a/drivers/hsi/clients/cmt_speech.c +++ b/drivers/hsi/clients/cmt_speech.c @@ -827,7 +827,7 @@ static int check_buf_params(struct cs_hsi_iface *hi, return r; } -/** +/* * Block until pending data transfers have completed. */ static int cs_hsi_data_sync(struct cs_hsi_iface *hi) @@ -850,7 +850,7 @@ static int cs_hsi_data_sync(struct cs_hsi_iface *hi) r = -ERESTARTSYS; goto out; } - /** + /* * prepare_to_wait must be called with hi->lock held * so that callbacks can check for waitqueue_active() */ @@ -965,14 +965,13 @@ static int cs_hsi_buf_config(struct cs_hsi_iface *hi, if (old_state != hi->iface_state) { if (hi->iface_state == CS_STATE_CONFIGURED) { - pm_qos_add_request(&hi->pm_qos_req, - PM_QOS_CPU_DMA_LATENCY, + cpu_latency_qos_add_request(&hi->pm_qos_req, CS_QOS_LATENCY_FOR_DATA_USEC); local_bh_disable(); cs_hsi_read_on_data(hi); local_bh_enable(); } else if (old_state == CS_STATE_CONFIGURED) { - pm_qos_remove_request(&hi->pm_qos_req); + cpu_latency_qos_remove_request(&hi->pm_qos_req); } } return r; @@ -1075,8 +1074,8 @@ static void cs_hsi_stop(struct cs_hsi_iface *hi) WARN_ON(!cs_state_idle(hi->control_state)); WARN_ON(!cs_state_idle(hi->data_state)); - if (pm_qos_request_active(&hi->pm_qos_req)) - pm_qos_remove_request(&hi->pm_qos_req); + if (cpu_latency_qos_request_active(&hi->pm_qos_req)) + cpu_latency_qos_remove_request(&hi->pm_qos_req); spin_lock_bh(&hi->lock); cs_hsi_free_data(hi); @@ -1090,7 +1089,7 @@ static vm_fault_t cs_char_vma_fault(struct vm_fault *vmf) struct cs_char *csdata = vmf->vma->vm_private_data; struct page *page; - page = virt_to_page(csdata->mmap_base); + page = virt_to_page((void *)csdata->mmap_base); get_page(page); vmf->page = page; diff --git a/drivers/hsi/clients/nokia-modem.c b/drivers/hsi/clients/nokia-modem.c index cd7ebf4c2e2f..97ba59e60663 100644 --- a/drivers/hsi/clients/nokia-modem.c +++ b/drivers/hsi/clients/nokia-modem.c @@ -13,7 +13,6 @@ #include <linux/interrupt.h> #include <linux/of.h> #include <linux/of_irq.h> -#include <linux/of_gpio.h> #include <linux/hsi/ssi_protocol.h> static unsigned int pm = 1; @@ -75,8 +74,7 @@ static int nokia_modem_gpio_probe(struct device *dev) struct nokia_modem_device *modem = dev_get_drvdata(dev); int gpio_count, gpio_name_count, i, err; - gpio_count = of_gpio_count(np); - + gpio_count = gpiod_count(dev, NULL); if (gpio_count < 0) { dev_err(dev, "missing gpios: %d\n", gpio_count); return gpio_count; diff --git a/drivers/hsi/clients/ssi_protocol.c b/drivers/hsi/clients/ssi_protocol.c index 365b5d5967ac..274ad8443f8c 100644 --- a/drivers/hsi/clients/ssi_protocol.c +++ b/drivers/hsi/clients/ssi_protocol.c @@ -291,7 +291,7 @@ static void ssip_set_rxstate(struct ssi_protocol *ssi, unsigned int state) /* CMT speech workaround */ if (atomic_read(&ssi->tx_usecnt)) break; - /* Else, fall through */ + fallthrough; case RECEIVING: mod_timer(&ssi->keep_alive, jiffies + msecs_to_jiffies(SSIP_KATOUT)); @@ -466,7 +466,7 @@ static void ssip_keep_alive(struct timer_list *t) case SEND_READY: if (atomic_read(&ssi->tx_usecnt) == 0) break; - /* Fall through */ + fallthrough; /* * Workaround for cmt-speech in that case * we relay on audio timers. @@ -668,7 +668,7 @@ static void ssip_rx_bootinforeq(struct hsi_client *cl, u32 cmd) case ACTIVE: dev_err(&cl->device, "Boot info req on active state\n"); ssip_error(cl); - /* Fall through */ + fallthrough; case INIT: case HANDSHAKE: spin_lock_bh(&ssi->lock); @@ -796,7 +796,6 @@ static void ssip_rx_strans(struct hsi_client *cl, u32 cmd) dev_err(&cl->device, "No memory for rx skb\n"); goto out1; } - skb->dev = ssi->netdev; skb_put(skb, len * 4); msg = ssip_alloc_data(ssi, skb, GFP_ATOMIC); if (unlikely(!msg)) { @@ -931,6 +930,7 @@ static int ssip_pn_open(struct net_device *dev) if (err < 0) { dev_err(&cl->device, "Register HSI port event failed (%d)\n", err); + hsi_release_port(cl); return err; } dev_dbg(&cl->device, "Configuring SSI port\n"); @@ -1055,14 +1055,16 @@ static const struct net_device_ops ssip_pn_ops = { static void ssip_pn_setup(struct net_device *dev) { + static const u8 addr = PN_MEDIA_SOS; + dev->features = 0; dev->netdev_ops = &ssip_pn_ops; dev->type = ARPHRD_PHONET; dev->flags = IFF_POINTOPOINT | IFF_NOARP; dev->mtu = SSIP_DEFAULT_MTU; dev->hard_header_len = 1; - dev->dev_addr[0] = PN_MEDIA_SOS; dev->addr_len = 1; + dev_addr_set(dev, &addr); dev->tx_queue_len = SSIP_TXQUEUE_LEN; dev->needs_free_netdev = true; diff --git a/drivers/hsi/controllers/Kconfig b/drivers/hsi/controllers/Kconfig index 3ad4a5a9ab05..03ca5b558824 100644 --- a/drivers/hsi/controllers/Kconfig +++ b/drivers/hsi/controllers/Kconfig @@ -8,7 +8,7 @@ config OMAP_SSI tristate "OMAP SSI hardware driver" depends on HSI && OF && ARM && COMMON_CLK depends on ARCH_OMAP3 || COMPILE_TEST - ---help--- + help SSI is a legacy version of HSI. It is usually used to connect an application engine with a cellular modem. If you say Y here, you will enable the OMAP SSI hardware driver. diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c index 4bc4a201f0f6..eb9820158318 100644 --- a/drivers/hsi/controllers/omap_ssi_core.c +++ b/drivers/hsi/controllers/omap_ssi_core.c @@ -296,7 +296,7 @@ static int ssi_clk_event(struct notifier_block *nb, unsigned long event, break; case ABORT_RATE_CHANGE: dev_dbg(&ssi->device, "abort rate change\n"); - /* Fall through */ + fallthrough; case POST_RATE_CHANGE: dev_dbg(&ssi->device, "post rate change (%lu -> %lu)\n", clk_data->old_rate, clk_data->new_rate); @@ -355,7 +355,7 @@ static int ssi_add_controller(struct hsi_controller *ssi, err = ida_simple_get(&platform_omap_ssi_ida, 0, 0, GFP_KERNEL); if (err < 0) - goto out_err; + return err; ssi->id = err; ssi->owner = THIS_MODULE; @@ -424,7 +424,7 @@ static int ssi_hw_init(struct hsi_controller *ssi) struct omap_ssi_controller *omap_ssi = hsi_controller_drvdata(ssi); int err; - err = pm_runtime_get_sync(ssi->device.parent); + err = pm_runtime_resume_and_get(ssi->device.parent); if (err < 0) { dev_err(&ssi->device, "runtime PM failed %d\n", err); return err; @@ -524,6 +524,7 @@ static int ssi_probe(struct platform_device *pd) if (!childpdev) { err = -ENODEV; dev_err(&pd->dev, "failed to create ssi controller port\n"); + of_node_put(child); goto out3; } } diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index a0cb5be246e1..b9495b720f1b 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -230,10 +230,10 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch) if (msg->ttype == HSI_MSG_READ) { err = dma_map_sg(&ssi->device, msg->sgt.sgl, msg->sgt.nents, DMA_FROM_DEVICE); - if (err < 0) { + if (!err) { dev_dbg(&ssi->device, "DMA map SG failed !\n"); pm_runtime_put_autosuspend(omap_port->pdev); - return err; + return -EIO; } csdp = SSI_DST_BURST_4x32_BIT | SSI_DST_MEMORY_PORT | SSI_SRC_SINGLE_ACCESS0 | SSI_SRC_PERIPHERAL_PORT | @@ -247,10 +247,10 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch) } else { err = dma_map_sg(&ssi->device, msg->sgt.sgl, msg->sgt.nents, DMA_TO_DEVICE); - if (err < 0) { + if (!err) { dev_dbg(&ssi->device, "DMA map SG failed !\n"); pm_runtime_put_autosuspend(omap_port->pdev); - return err; + return -EIO; } csdp = SSI_SRC_BURST_4x32_BIT | SSI_SRC_MEMORY_PORT | SSI_DST_SINGLE_ACCESS0 | SSI_DST_PERIPHERAL_PORT | diff --git a/drivers/hsi/hsi_core.c b/drivers/hsi/hsi_core.c index 47f0208aa7c3..884066109699 100644 --- a/drivers/hsi/hsi_core.c +++ b/drivers/hsi/hsi_core.c @@ -102,6 +102,7 @@ struct hsi_client *hsi_new_client(struct hsi_port *port, if (device_register(&cl->device) < 0) { pr_err("hsi: failed to register client: %s\n", info->name); put_device(&cl->device); + goto err; } return cl; @@ -210,8 +211,6 @@ static void hsi_add_client_from_dt(struct hsi_port *port, if (err) goto err; - dev_set_name(&cl->device, "%s", name); - err = hsi_of_property_parse_mode(client, "hsi-mode", &mode); if (err) { err = hsi_of_property_parse_mode(client, "hsi-rx-mode", @@ -293,6 +292,7 @@ static void hsi_add_client_from_dt(struct hsi_port *port, cl->device.release = hsi_client_release; cl->device.of_node = client; + dev_set_name(&cl->device, "%s", name); if (device_register(&cl->device) < 0) { pr_err("hsi: failed to register client: %s\n", name); put_device(&cl->device); @@ -352,7 +352,7 @@ static void hsi_port_release(struct device *dev) } /** - * hsi_unregister_port - Unregister an HSI port + * hsi_port_unregister_clients - Unregister an HSI port * @port: The HSI port to unregister */ void hsi_port_unregister_clients(struct hsi_port *port) |