mirror of
https://github.com/tbsdtv/media_build.git
synced 2025-07-23 04:13:02 +02:00
Add backports/v5.9_netup_unidvb_devm_revert.patch
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
@@ -29,6 +29,7 @@ add ccs.patch
|
||||
|
||||
[5.9.255]
|
||||
add v5.9_tasklet.patch
|
||||
add v5.9_netup_unidvb_devm_revert.patch
|
||||
|
||||
[5.7.255]
|
||||
add v5.7_mmap_read_lock.patch
|
||||
|
36
backports/v5.9_netup_unidvb_devm_revert.patch
Normal file
36
backports/v5.9_netup_unidvb_devm_revert.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_spi.c b/drivers/media/pci/netup_unidvb/netup_unidvb_spi.c
|
||||
index 526042d8afae..d4f12c250f91 100644
|
||||
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_spi.c
|
||||
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_spi.c
|
||||
@@ -175,7 +175,7 @@ int netup_spi_init(struct netup_unidvb_dev *ndev)
|
||||
struct spi_master *master;
|
||||
struct netup_spi *nspi;
|
||||
|
||||
- master = devm_spi_alloc_master(&ndev->pci_dev->dev,
|
||||
+ master = spi_alloc_master(&ndev->pci_dev->dev,
|
||||
sizeof(struct netup_spi));
|
||||
if (!master) {
|
||||
dev_err(&ndev->pci_dev->dev,
|
||||
@@ -208,7 +208,6 @@ int netup_spi_init(struct netup_unidvb_dev *ndev)
|
||||
ndev->pci_slot,
|
||||
ndev->pci_func);
|
||||
if (!spi_new_device(master, &netup_spi_board)) {
|
||||
- spi_unregister_master(master);
|
||||
ndev->spi = NULL;
|
||||
dev_err(&ndev->pci_dev->dev,
|
||||
"%s(): unable to create SPI device\n", __func__);
|
||||
@@ -227,13 +226,13 @@ void netup_spi_release(struct netup_unidvb_dev *ndev)
|
||||
if (!spi)
|
||||
return;
|
||||
|
||||
- spi_unregister_master(spi->master);
|
||||
spin_lock_irqsave(&spi->lock, flags);
|
||||
reg = readw(&spi->regs->control_stat);
|
||||
writew(reg | NETUP_SPI_CTRL_IRQ, &spi->regs->control_stat);
|
||||
reg = readw(&spi->regs->control_stat);
|
||||
writew(reg & ~NETUP_SPI_CTRL_IMASK, &spi->regs->control_stat);
|
||||
spin_unlock_irqrestore(&spi->lock, flags);
|
||||
+ spi_unregister_master(spi->master);
|
||||
ndev->spi = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user