forked from Minki/linux
HSI changes for the 6.1 series
* completely switch to gpiod API * misc. small fixes -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmM/JVgACgkQ2O7X88g7 +poxuQ//XoqwEwlc9dC6qog36QFOGIszhJZCQzJ0WMjHuVmsAJ8BSs+Ye0O3tiV+ b8jaw1w+mMagZzTz8us7Ha2jvqTtvcGEIw6dL7A+qEtRikbRWrMUlsBAwR9PE45t 5nBIvFmZevsoDpD9f25RB6wqjdSlf2cKG8fR795UlZD9i6jW30L5sRcqssQArC8b 5kfMMTb2H0CoAoZ/yk1LPSjU0mtApctwLJRVrGoeCfPsayudKSm7x8SAs1sMBiYT /bjJLRvecQy2ri29CIPjXUh6mJCFbqJ4OqkCnz++u3PXnRTLpC6plGH8O+7/19Pw I3rnx7g9ELr8rR7xI0O+t6IXSMw64XdrE9ZQHNhrVE25RUJWW1J5g0w0FgVf/YKN AJ8pemPr1EslluyN8iiiFFuQKac8ScPC25EIwvCR7R1rReqImDiX+48jhsiCDQe1 KOc3tmZypDIBGtYuad8/2gcClVmPeytb+7tVtKHl9UZ9vSHQV8QSo0LwaamHZg1i 0nlJUD5Qv2xKjuYu4E2C0PP9VJ7218kTS2ghwZzk345FhKE/tykqFll1njP3l6xA 4/t6I19x2P2aVAJgWUIwib1Uvel+xq9NXfZ+7yyZdlX6j7AzX01tQY4qprIrkyRl aatk8Oo1U5/AfM/bJ/AA51wFJHF8qfQdOuP3fhAHtknEOjLkwTU= =bPyf -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
83da5ec6b7
@ -1089,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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 |
|
||||
|
Loading…
Reference in New Issue
Block a user