Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for kernel 6.1 #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions dvb-frontends/cxd2820r_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ static int cxd2820r_probe(struct i2c_client *client,
return ret;
}

static int cxd2820r_remove(struct i2c_client *client)
static void cxd2820r_remove(struct i2c_client *client)
{
struct cxd2820r_priv *priv = i2c_get_clientdata(client);

Expand All @@ -733,8 +733,6 @@ static int cxd2820r_remove(struct i2c_client *client)
regmap_exit(priv->regmap[0]);

kfree(priv);

return 0;
}

static const struct i2c_device_id cxd2820r_id_table[] = {
Expand Down
6 changes: 2 additions & 4 deletions dvb-frontends/gx1503.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ static int gx1503_probe( struct i2c_client *client,
dev_dbg(&client->dev,"failed = %d\n",ret);
return ret;
}
static int gx1503_remove(struct i2c_client *client)
static void gx1503_remove(struct i2c_client *client)
{
struct gx1503_dev*dev = i2c_get_clientdata(client);

Expand All @@ -565,10 +565,8 @@ static int gx1503_remove(struct i2c_client *client)
dev->fe.ops.release = NULL;
dev->fe.demodulator_priv = NULL;
kfree(dev);

return 0;

}

static const struct i2c_device_id gx1503_id_table[] = {
{"gx1503",0},
{}
Expand Down
3 changes: 1 addition & 2 deletions dvb-frontends/m88rs6060.c
Original file line number Diff line number Diff line change
Expand Up @@ -3336,7 +3336,7 @@ static int m88rs6060_probe(struct i2c_client *client,
return ret;
}

static int m88rs6060_remove(struct i2c_client *client)
static void m88rs6060_remove(struct i2c_client *client)
{
struct m88rs6060_dev *dev = i2c_get_clientdata(client);
dev_dbg(&client->dev, "\n");
Expand All @@ -3348,7 +3348,6 @@ static int m88rs6060_remove(struct i2c_client *client)
dev->fe.demodulator_priv = NULL;

kfree(dev);
return 0;
}

static const struct i2c_device_id m88rs6060_id_table[] = {
Expand Down
4 changes: 1 addition & 3 deletions dvb-frontends/mtv23x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2339,14 +2339,12 @@ static int mtv23x_probe(struct i2c_client*client,
dev_dbg(&client->dev,"failed = %d\n",ret);
return ret;
}
static int mtv23x_remove(struct i2c_client*client)
static void mtv23x_remove(struct i2c_client *client)
{
struct mtv23x_dev*dev = i2c_get_clientdata(client);

regmap_exit(dev->regmap);
kfree(dev);

return 0;
}

static const struct i2c_device_id mtv23x_id_table[] ={
Expand Down
4 changes: 1 addition & 3 deletions dvb-frontends/si2168.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ static int si2168_probe(struct i2c_client *client,
return ret;
}

static int si2168_remove(struct i2c_client *client)
static void si2168_remove(struct i2c_client *client)
{
struct si2168_dev *dev = i2c_get_clientdata(client);

Expand All @@ -952,8 +952,6 @@ static int si2168_remove(struct i2c_client *client)
dev->fe.demodulator_priv = NULL;

kfree(dev);

return 0;
}

static const struct i2c_device_id si2168_id_table[] = {
Expand Down
4 changes: 1 addition & 3 deletions dvb-frontends/si2183.c
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ static int si2183_probe(struct i2c_client *client,
return ret;
}

static int si2183_remove(struct i2c_client *client)
static void si2183_remove(struct i2c_client *client)
{
struct si2183_dev *dev = i2c_get_clientdata(client);

Expand All @@ -1615,8 +1615,6 @@ static int si2183_remove(struct i2c_client *client)
dev->fe.demodulator_priv = NULL;

kfree(dev);

return 0;
}

static const struct i2c_device_id si2183_id_table[] = {
Expand Down
3 changes: 1 addition & 2 deletions dvb-frontends/stv090x.c
Original file line number Diff line number Diff line change
Expand Up @@ -5207,12 +5207,11 @@ static int stv090x_probe(struct i2c_client *client,
return ret;
}

static int stv090x_remove(struct i2c_client *client)
static void stv090x_remove(struct i2c_client *client)
{
struct stv090x_state *state = i2c_get_clientdata(client);

stv090x_release(&state->frontend);
return 0;
}

struct dvb_frontend *stv090x_attach(struct stv090x_config *config,
Expand Down
3 changes: 1 addition & 2 deletions dvb-frontends/stv6110x.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,11 @@ static int stv6110x_probe(struct i2c_client *client,
return 0;
}

static int stv6110x_remove(struct i2c_client *client)
static void stv6110x_remove(struct i2c_client *client)
{
struct stv6110x_state *stv6110x = i2c_get_clientdata(client);

stv6110x_release(stv6110x->frontend);
return 0;
}

const struct stv6110x_devctl *stv6110x_attach(struct dvb_frontend *fe,
Expand Down
4 changes: 2 additions & 2 deletions saa716x/saa716x_budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ static void demux_worker(unsigned long data)
do {
u8 *data = (u8 *)fgpi_entry->dma_buf[fgpi_entry->read_index].mem_virt;

pci_dma_sync_sg_for_cpu(saa716x->pdev,
dma_sync_sg_for_cpu(&saa716x->pdev->dev,
fgpi_entry->dma_buf[fgpi_entry->read_index].sg_list,
fgpi_entry->dma_buf[fgpi_entry->read_index].list_len,
PCI_DMA_FROMDEVICE);
DMA_FROM_DEVICE);

dvb_dmx_swfilter(demux, data, 348 * 188);

Expand Down
12 changes: 6 additions & 6 deletions saa716x/saa716x_ff_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,15 +613,15 @@ static void video_vip_worker(unsigned long data)
}

do {
pci_dma_sync_sg_for_cpu(saa716x->pdev,
dma_sync_sg_for_cpu(&saa716x->pdev->dev,
vip_entry->dma_buf[0][vip_entry->read_index].sg_list,
vip_entry->dma_buf[0][vip_entry->read_index].list_len,
PCI_DMA_FROMDEVICE);
DMA_FROM_DEVICE);
if (vip_entry->dual_channel) {
pci_dma_sync_sg_for_cpu(saa716x->pdev,
dma_sync_sg_for_cpu(&saa716x->pdev->dev,
vip_entry->dma_buf[1][vip_entry->read_index].sg_list,
vip_entry->dma_buf[1][vip_entry->read_index].list_len,
PCI_DMA_FROMDEVICE);
DMA_FROM_DEVICE);
}

vip_entry->read_index = (vip_entry->read_index + 1) & 7;
Expand Down Expand Up @@ -1289,10 +1289,10 @@ static void demux_worker(unsigned long data)
do {
u8 *data = (u8 *)fgpi_entry->dma_buf[fgpi_entry->read_index].mem_virt;

pci_dma_sync_sg_for_cpu(saa716x->pdev,
dma_sync_sg_for_cpu(&saa716x->pdev->dev,
fgpi_entry->dma_buf[fgpi_entry->read_index].sg_list,
fgpi_entry->dma_buf[fgpi_entry->read_index].list_len,
PCI_DMA_FROMDEVICE);
DMA_FROM_DEVICE);

dvb_dmx_swfilter(demux, data, 348 * 188);

Expand Down
4 changes: 2 additions & 2 deletions saa716x/saa716x_hybrid.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ static void demux_worker(unsigned long data)
do {
u8 *data = (u8 *)fgpi_entry->dma_buf[fgpi_entry->read_index].mem_virt;

pci_dma_sync_sg_for_cpu(saa716x->pdev,
dma_sync_sg_for_cpu(&saa716x->pdev->dev,
fgpi_entry->dma_buf[fgpi_entry->read_index].sg_list,
fgpi_entry->dma_buf[fgpi_entry->read_index].list_len,
PCI_DMA_FROMDEVICE);
DMA_FROM_DEVICE);

dvb_dmx_swfilter(demux, data, 348 * 188);

Expand Down
6 changes: 3 additions & 3 deletions saa716x/saa716x_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ int saa716x_pci_init(struct saa716x_dev *saa716x)
goto fail0;
}

if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
use_dac = 1;
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
if (err) {
dprintk(SAA716x_ERROR, 1, "Unable to obtain 64bit DMA");
goto fail1;
}
} else if ((err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) {
} else if ((err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32))) != 0) {
dprintk(SAA716x_ERROR, 1, "Unable to obtain 32bit DMA");
goto fail1;
}
Expand Down
4 changes: 2 additions & 2 deletions tbsecp3/tbsecp3-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ static int tbsecp3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (pci_enable_device(pdev) < 0)
return -ENODEV;

if(pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
if(pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
if(dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)))
if(dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)))
{
dev_err(&pdev->dev, "64/32-bit PCI DMA not supported\n");
goto err0;
Expand Down
10 changes: 5 additions & 5 deletions tbsecp3/tbsecp3-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ void tbsecp3_dma_free(struct tbsecp3_dev *dev)
if (adapter->dma.buf[0] == NULL)
continue;

pci_free_consistent(dev->pci_dev,
dma_alloc_coherent(&dev->pci_dev->dev,
adapter->dma.page_size + 0x100,
adapter->dma.buf[0], adapter->dma.dma_addr);
&adapter->dma.dma_addr, GFP_ATOMIC);
adapter->dma.buf[0] = NULL;
adapter++;
}
Expand All @@ -149,9 +149,9 @@ int tbsecp3_dma_init(struct tbsecp3_dev *dev)
adapter->dma.buffer_size = dma_pkts[i] * TS_PACKET_SIZE;
adapter->dma.page_size = adapter->dma.buffer_size * TBSECP3_DMA_BUFFERS;

adapter->dma.buf[0] = pci_alloc_consistent(dev->pci_dev,
adapter->dma.page_size + 0x100,
&adapter->dma.dma_addr);
adapter->dma.buf[0] = dma_alloc_coherent(&dev->pci_dev->dev,
adapter->dma.page_size + 0x100,
&adapter->dma.dma_addr, GFP_ATOMIC);
if (!adapter->dma.buf[0])
goto err;

Expand Down
4 changes: 1 addition & 3 deletions tuners/mxl603.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,11 @@ static int mxl603_probe(struct i2c_client *client,
pr_err("%s___failed=%d\n",__FUNCTION__, ret);
return ret;
}
static int mxl603_remove(struct i2c_client *client)
static void mxl603_remove(struct i2c_client *client)
{
struct mxl603_dev *dev = i2c_get_clientdata(client);

kfree(dev);

return 0;
}

static const struct i2c_device_id mxl603_id_table[] = {
Expand Down
4 changes: 1 addition & 3 deletions tuners/si2157.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ static int si2157_probe(struct i2c_client *client,
return ret;
}

static int si2157_remove(struct i2c_client *client)
static void si2157_remove(struct i2c_client *client)
{
struct si2157_dev *dev = i2c_get_clientdata(client);
struct dvb_frontend *fe = dev->fe;
Expand All @@ -926,8 +926,6 @@ static int si2157_remove(struct i2c_client *client)
memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
fe->tuner_priv = NULL;
kfree(dev);

return 0;
}

static const struct i2c_device_id si2157_id_table[] = {
Expand Down
4 changes: 1 addition & 3 deletions tuners/tda18212.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int tda18212_probe(struct i2c_client *client,
return ret;
}

static int tda18212_remove(struct i2c_client *client)
static void tda18212_remove(struct i2c_client *client)
{
struct tda18212_dev *dev = i2c_get_clientdata(client);
struct dvb_frontend *fe = dev->cfg.fe;
Expand All @@ -266,8 +266,6 @@ static int tda18212_remove(struct i2c_client *client)
memset(&fe->ops.tuner_ops, 0, sizeof(struct dvb_tuner_ops));
fe->tuner_priv = NULL;
kfree(dev);

return 0;
}

static const struct i2c_device_id tda18212_id[] = {
Expand Down