Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'hsi-for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi

Pull HSI updates from Sebastian Reichel:

- completely switch to gpiod API

- misc small fixes

* tag 'hsi-for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
HSI: nokia-modem: Replace of_gpio_count() by gpiod_count()
HSI: ssi_protocol: fix potential resource leak in ssip_pn_open()
HSI: omap_ssi_port: Fix dma_map_sg error check
HSI: cmt_speech: Pass a pointer to virt_to_page()
HSI: omap_ssi: Fix refcount leak in ssi_probe
HSI: clients: remove duplicate assignment

+8 -9
+1 -1
drivers/hsi/clients/cmt_speech.c
··· 1089 1089 struct cs_char *csdata = vmf->vma->vm_private_data; 1090 1090 struct page *page; 1091 1091 1092 - page = virt_to_page(csdata->mmap_base); 1092 + page = virt_to_page((void *)csdata->mmap_base); 1093 1093 get_page(page); 1094 1094 vmf->page = page; 1095 1095
+1 -3
drivers/hsi/clients/nokia-modem.c
··· 13 13 #include <linux/interrupt.h> 14 14 #include <linux/of.h> 15 15 #include <linux/of_irq.h> 16 - #include <linux/of_gpio.h> 17 16 #include <linux/hsi/ssi_protocol.h> 18 17 19 18 static unsigned int pm = 1; ··· 74 75 struct nokia_modem_device *modem = dev_get_drvdata(dev); 75 76 int gpio_count, gpio_name_count, i, err; 76 77 77 - gpio_count = of_gpio_count(np); 78 - 78 + gpio_count = gpiod_count(dev, NULL); 79 79 if (gpio_count < 0) { 80 80 dev_err(dev, "missing gpios: %d\n", gpio_count); 81 81 return gpio_count;
+1 -1
drivers/hsi/clients/ssi_protocol.c
··· 796 796 dev_err(&cl->device, "No memory for rx skb\n"); 797 797 goto out1; 798 798 } 799 - skb->dev = ssi->netdev; 800 799 skb_put(skb, len * 4); 801 800 msg = ssip_alloc_data(ssi, skb, GFP_ATOMIC); 802 801 if (unlikely(!msg)) { ··· 930 931 if (err < 0) { 931 932 dev_err(&cl->device, "Register HSI port event failed (%d)\n", 932 933 err); 934 + hsi_release_port(cl); 933 935 return err; 934 936 } 935 937 dev_dbg(&cl->device, "Configuring SSI port\n");
+1
drivers/hsi/controllers/omap_ssi_core.c
··· 524 524 if (!childpdev) { 525 525 err = -ENODEV; 526 526 dev_err(&pd->dev, "failed to create ssi controller port\n"); 527 + of_node_put(child); 527 528 goto out3; 528 529 } 529 530 }
+4 -4
drivers/hsi/controllers/omap_ssi_port.c
··· 230 230 if (msg->ttype == HSI_MSG_READ) { 231 231 err = dma_map_sg(&ssi->device, msg->sgt.sgl, msg->sgt.nents, 232 232 DMA_FROM_DEVICE); 233 - if (err < 0) { 233 + if (!err) { 234 234 dev_dbg(&ssi->device, "DMA map SG failed !\n"); 235 235 pm_runtime_put_autosuspend(omap_port->pdev); 236 - return err; 236 + return -EIO; 237 237 } 238 238 csdp = SSI_DST_BURST_4x32_BIT | SSI_DST_MEMORY_PORT | 239 239 SSI_SRC_SINGLE_ACCESS0 | SSI_SRC_PERIPHERAL_PORT | ··· 247 247 } else { 248 248 err = dma_map_sg(&ssi->device, msg->sgt.sgl, msg->sgt.nents, 249 249 DMA_TO_DEVICE); 250 - if (err < 0) { 250 + if (!err) { 251 251 dev_dbg(&ssi->device, "DMA map SG failed !\n"); 252 252 pm_runtime_put_autosuspend(omap_port->pdev); 253 - return err; 253 + return -EIO; 254 254 } 255 255 csdp = SSI_SRC_BURST_4x32_BIT | SSI_SRC_MEMORY_PORT | 256 256 SSI_DST_SINGLE_ACCESS0 | SSI_DST_PERIPHERAL_PORT |