mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
linux-3.6.11: cleanup not needed patches
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
650de2ac1d
commit
9b1fcc3b9d
@ -1,74 +0,0 @@
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/ene_ir.c linux-3.6.11.patch/drivers/media/rc/ene_ir.c
|
||||
--- linux-3.6.11/drivers/media/rc/ene_ir.c 2012-12-17 18:27:45.000000000 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/ene_ir.c 2012-12-28 22:52:22.571974437 +0100
|
||||
@@ -1000,7 +1000,7 @@
|
||||
dev = kzalloc(sizeof(struct ene_device), GFP_KERNEL);
|
||||
rdev = rc_allocate_device();
|
||||
if (!dev || !rdev)
|
||||
- goto error1;
|
||||
+ goto failure;
|
||||
|
||||
/* validate resources */
|
||||
error = -ENODEV;
|
||||
@@ -1011,10 +1011,10 @@
|
||||
|
||||
if (!pnp_port_valid(pnp_dev, 0) ||
|
||||
pnp_port_len(pnp_dev, 0) < ENE_IO_SIZE)
|
||||
- goto error;
|
||||
+ goto failure;
|
||||
|
||||
if (!pnp_irq_valid(pnp_dev, 0))
|
||||
- goto error;
|
||||
+ goto failure;
|
||||
|
||||
spin_lock_init(&dev->hw_lock);
|
||||
|
||||
@@ -1030,7 +1030,7 @@
|
||||
/* detect hardware version and features */
|
||||
error = ene_hw_detect(dev);
|
||||
if (error)
|
||||
- goto error;
|
||||
+ goto failure;
|
||||
|
||||
if (!dev->hw_learning_and_tx_capable && txsim) {
|
||||
dev->hw_learning_and_tx_capable = true;
|
||||
@@ -1075,30 +1075,27 @@
|
||||
/* claim the resources */
|
||||
error = -EBUSY;
|
||||
if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
|
||||
- dev->hw_io = -1;
|
||||
- dev->irq = -1;
|
||||
- goto error;
|
||||
+ goto failure;
|
||||
}
|
||||
|
||||
dev->irq = pnp_irq(pnp_dev, 0);
|
||||
if (request_irq(dev->irq, ene_isr,
|
||||
IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) {
|
||||
- dev->irq = -1;
|
||||
- goto error;
|
||||
+ goto failure2;
|
||||
}
|
||||
|
||||
error = rc_register_device(rdev);
|
||||
if (error < 0)
|
||||
- goto error;
|
||||
+ goto failure3;
|
||||
|
||||
pr_notice("driver has been successfully loaded\n");
|
||||
return 0;
|
||||
-error:
|
||||
- if (dev && dev->irq >= 0)
|
||||
- free_irq(dev->irq, dev);
|
||||
- if (dev && dev->hw_io >= 0)
|
||||
- release_region(dev->hw_io, ENE_IO_SIZE);
|
||||
-error1:
|
||||
+
|
||||
+failure3:
|
||||
+ free_irq(dev->irq, dev);
|
||||
+failure2:
|
||||
+ release_region(dev->hw_io, ENE_IO_SIZE);
|
||||
+failure:
|
||||
rc_free_device(rdev);
|
||||
kfree(dev);
|
||||
return error;
|
@ -70,141 +70,7 @@ diff -Naur linux-3.6.11/drivers/media/rc/ati_remote.c linux-3.6.11.patch/drivers
|
||||
return err;
|
||||
}
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/ene_ir.c linux-3.6.11.patch/drivers/media/rc/ene_ir.c
|
||||
--- linux-3.6.11/drivers/media/rc/ene_ir.c 2012-12-28 22:53:15.840572260 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/ene_ir.c 2012-12-28 22:53:29.114472156 +0100
|
||||
@@ -1000,7 +1000,7 @@
|
||||
dev = kzalloc(sizeof(struct ene_device), GFP_KERNEL);
|
||||
rdev = rc_allocate_device();
|
||||
if (!dev || !rdev)
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
/* validate resources */
|
||||
error = -ENODEV;
|
||||
@@ -1011,10 +1011,10 @@
|
||||
|
||||
if (!pnp_port_valid(pnp_dev, 0) ||
|
||||
pnp_port_len(pnp_dev, 0) < ENE_IO_SIZE)
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
if (!pnp_irq_valid(pnp_dev, 0))
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
spin_lock_init(&dev->hw_lock);
|
||||
|
||||
@@ -1030,7 +1030,7 @@
|
||||
/* detect hardware version and features */
|
||||
error = ene_hw_detect(dev);
|
||||
if (error)
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
if (!dev->hw_learning_and_tx_capable && txsim) {
|
||||
dev->hw_learning_and_tx_capable = true;
|
||||
@@ -1075,27 +1075,27 @@
|
||||
/* claim the resources */
|
||||
error = -EBUSY;
|
||||
if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
}
|
||||
|
||||
dev->irq = pnp_irq(pnp_dev, 0);
|
||||
if (request_irq(dev->irq, ene_isr,
|
||||
IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) {
|
||||
- goto failure2;
|
||||
+ goto exit_release_hw_io;
|
||||
}
|
||||
|
||||
error = rc_register_device(rdev);
|
||||
if (error < 0)
|
||||
- goto failure3;
|
||||
+ goto exit_free_irq;
|
||||
|
||||
pr_notice("driver has been successfully loaded\n");
|
||||
return 0;
|
||||
|
||||
-failure3:
|
||||
+exit_free_irq:
|
||||
free_irq(dev->irq, dev);
|
||||
-failure2:
|
||||
+exit_release_hw_io:
|
||||
release_region(dev->hw_io, ENE_IO_SIZE);
|
||||
-failure:
|
||||
+exit_free_dev_rdev:
|
||||
rc_free_device(rdev);
|
||||
kfree(dev);
|
||||
return error;
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/fintek-cir.c linux-3.6.11.patch/drivers/media/rc/fintek-cir.c
|
||||
--- linux-3.6.11/drivers/media/rc/fintek-cir.c 2012-12-28 22:53:15.839572268 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/fintek-cir.c 2012-12-28 22:53:29.115472147 +0100
|
||||
@@ -495,18 +495,18 @@
|
||||
/* input device for IR remote (and tx) */
|
||||
rdev = rc_allocate_device();
|
||||
if (!rdev)
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
ret = -ENODEV;
|
||||
/* validate pnp resources */
|
||||
if (!pnp_port_valid(pdev, 0)) {
|
||||
dev_err(&pdev->dev, "IR PNP Port not valid!\n");
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
}
|
||||
|
||||
if (!pnp_irq_valid(pdev, 0)) {
|
||||
dev_err(&pdev->dev, "IR PNP IRQ not valid!\n");
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
}
|
||||
|
||||
fintek->cir_addr = pnp_port_start(pdev, 0);
|
||||
@@ -523,7 +523,7 @@
|
||||
|
||||
ret = fintek_hw_detect(fintek);
|
||||
if (ret)
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
/* Initialize CIR & CIR Wake Logical Devices */
|
||||
fintek_config_mode_enable(fintek);
|
||||
@@ -556,15 +556,15 @@
|
||||
/* now claim resources */
|
||||
if (!request_region(fintek->cir_addr,
|
||||
fintek->cir_port_len, FINTEK_DRIVER_NAME))
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
if (request_irq(fintek->cir_irq, fintek_cir_isr, IRQF_SHARED,
|
||||
FINTEK_DRIVER_NAME, (void *)fintek))
|
||||
- goto failure2;
|
||||
+ goto exit_free_cir_addr;
|
||||
|
||||
ret = rc_register_device(rdev);
|
||||
if (ret)
|
||||
- goto failure3;
|
||||
+ goto exit_free_irq;
|
||||
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
fintek->rdev = rdev;
|
||||
@@ -574,11 +574,11 @@
|
||||
|
||||
return 0;
|
||||
|
||||
-failure3:
|
||||
+exit_free_irq:
|
||||
free_irq(fintek->cir_irq, fintek);
|
||||
-failure2:
|
||||
+exit_free_cir_addr:
|
||||
release_region(fintek->cir_addr, fintek->cir_port_len);
|
||||
-failure:
|
||||
+exit_free_dev_rdev:
|
||||
rc_free_device(rdev);
|
||||
kfree(fintek);
|
||||
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/gpio-ir-recv.c linux-3.6.11.patch/drivers/media/rc/gpio-ir-recv.c
|
||||
--- linux-3.6.11/drivers/media/rc/gpio-ir-recv.c 2012-12-28 22:53:15.839572268 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/gpio-ir-recv.c 2012-12-28 22:53:29.115472147 +0100
|
||||
@ -263,154 +129,4 @@ diff -Naur linux-3.6.11/drivers/media/rc/gpio-ir-recv.c linux-3.6.11.patch/drive
|
||||
return rc;
|
||||
}
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/ite-cir.c linux-3.6.11.patch/drivers/media/rc/ite-cir.c
|
||||
--- linux-3.6.11/drivers/media/rc/ite-cir.c 2012-12-28 22:53:15.840572260 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/ite-cir.c 2012-12-28 22:58:06.139364653 +0100
|
||||
@@ -1472,7 +1472,7 @@
|
||||
/* input device for IR remote (and tx) */
|
||||
rdev = rc_allocate_device();
|
||||
if (!rdev)
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
itdev->rdev = rdev;
|
||||
|
||||
ret = -ENODEV;
|
||||
@@ -1498,12 +1498,12 @@
|
||||
if (!pnp_port_valid(pdev, io_rsrc_no) ||
|
||||
pnp_port_len(pdev, io_rsrc_no) != dev_desc->io_region_size) {
|
||||
dev_err(&pdev->dev, "IR PNP Port not valid!\n");
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
}
|
||||
|
||||
if (!pnp_irq_valid(pdev, 0)) {
|
||||
dev_err(&pdev->dev, "PNP IRQ not valid!\n");
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
}
|
||||
|
||||
/* store resource values */
|
||||
@@ -1595,25 +1595,26 @@
|
||||
/* now claim resources */
|
||||
if (!request_region(itdev->cir_addr,
|
||||
dev_desc->io_region_size, ITE_DRIVER_NAME))
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
+
|
||||
|
||||
if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED,
|
||||
ITE_DRIVER_NAME, (void *)itdev))
|
||||
- goto failure2;
|
||||
+ goto exit_release_cir_addr;
|
||||
|
||||
ret = rc_register_device(rdev);
|
||||
if (ret)
|
||||
- goto failure3;
|
||||
+ goto exit_free_irq;
|
||||
|
||||
ite_pr(KERN_NOTICE, "driver has been successfully loaded\n");
|
||||
|
||||
return 0;
|
||||
|
||||
-failure3:
|
||||
+exit_free_irq:
|
||||
free_irq(itdev->cir_irq, itdev);
|
||||
-failure2:
|
||||
+exit_release_cir_addr:
|
||||
release_region(itdev->cir_addr, itdev->params.io_region_size);
|
||||
-failure:
|
||||
+exit_free_dev_rdev:
|
||||
rc_free_device(rdev);
|
||||
kfree(itdev);
|
||||
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/nuvoton-cir.c linux-3.6.11.patch/drivers/media/rc/nuvoton-cir.c
|
||||
--- linux-3.6.11/drivers/media/rc/nuvoton-cir.c 2012-12-28 22:53:15.839572268 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/nuvoton-cir.c 2012-12-28 22:53:29.118472125 +0100
|
||||
@@ -986,25 +986,25 @@
|
||||
/* input device for IR remote (and tx) */
|
||||
rdev = rc_allocate_device();
|
||||
if (!rdev)
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
ret = -ENODEV;
|
||||
/* validate pnp resources */
|
||||
if (!pnp_port_valid(pdev, 0) ||
|
||||
pnp_port_len(pdev, 0) < CIR_IOREG_LENGTH) {
|
||||
dev_err(&pdev->dev, "IR PNP Port not valid!\n");
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
}
|
||||
|
||||
if (!pnp_irq_valid(pdev, 0)) {
|
||||
dev_err(&pdev->dev, "PNP IRQ not valid!\n");
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
}
|
||||
|
||||
if (!pnp_port_valid(pdev, 1) ||
|
||||
pnp_port_len(pdev, 1) < CIR_IOREG_LENGTH) {
|
||||
dev_err(&pdev->dev, "Wake PNP Port not valid!\n");
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
}
|
||||
|
||||
nvt->cir_addr = pnp_port_start(pdev, 0);
|
||||
@@ -1027,7 +1027,7 @@
|
||||
|
||||
ret = nvt_hw_detect(nvt);
|
||||
if (ret)
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
/* Initialize CIR & CIR Wake Logical Devices */
|
||||
nvt_efm_enable(nvt);
|
||||
@@ -1070,23 +1070,23 @@
|
||||
/* now claim resources */
|
||||
if (!request_region(nvt->cir_addr,
|
||||
CIR_IOREG_LENGTH, NVT_DRIVER_NAME))
|
||||
- goto failure;
|
||||
+ goto exit_free_dev_rdev;
|
||||
|
||||
if (request_irq(nvt->cir_irq, nvt_cir_isr, IRQF_SHARED,
|
||||
NVT_DRIVER_NAME, (void *)nvt))
|
||||
- goto failure2;
|
||||
+ goto exit_release_cir_addr;
|
||||
|
||||
if (!request_region(nvt->cir_wake_addr,
|
||||
CIR_IOREG_LENGTH, NVT_DRIVER_NAME))
|
||||
- goto failure3;
|
||||
+ goto exit_free_irq;
|
||||
|
||||
if (request_irq(nvt->cir_wake_irq, nvt_cir_wake_isr, IRQF_SHARED,
|
||||
NVT_DRIVER_NAME, (void *)nvt))
|
||||
- goto failure4;
|
||||
+ goto exit_release_cir_wake_addr;
|
||||
|
||||
ret = rc_register_device(rdev);
|
||||
if (ret)
|
||||
- goto failure5;
|
||||
+ goto exit_free_wake_irq;
|
||||
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
nvt->rdev = rdev;
|
||||
@@ -1098,15 +1098,15 @@
|
||||
|
||||
return 0;
|
||||
|
||||
-failure5:
|
||||
+exit_free_wake_irq:
|
||||
free_irq(nvt->cir_wake_irq, nvt);
|
||||
-failure4:
|
||||
+exit_release_cir_wake_addr:
|
||||
release_region(nvt->cir_wake_addr, CIR_IOREG_LENGTH);
|
||||
-failure3:
|
||||
+exit_free_irq:
|
||||
free_irq(nvt->cir_irq, nvt);
|
||||
-failure2:
|
||||
+exit_release_cir_addr:
|
||||
release_region(nvt->cir_addr, CIR_IOREG_LENGTH);
|
||||
-failure:
|
||||
+exit_free_dev_rdev:
|
||||
rc_free_device(rdev);
|
||||
kfree(nvt);
|
||||
|
||||
|
@ -1,53 +0,0 @@
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/fintek-cir.c linux-3.6.11.patch/drivers/media/rc/fintek-cir.c
|
||||
--- linux-3.6.11/drivers/media/rc/fintek-cir.c 2012-12-28 22:59:21.808868854 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/fintek-cir.c 2012-12-28 22:59:37.532767678 +0100
|
||||
@@ -552,6 +552,8 @@
|
||||
/* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */
|
||||
rdev->rx_resolution = US_TO_NS(CIR_SAMPLE_PERIOD);
|
||||
|
||||
+ fintek->rdev = rdev;
|
||||
+
|
||||
ret = -EBUSY;
|
||||
/* now claim resources */
|
||||
if (!request_region(fintek->cir_addr,
|
||||
@@ -567,7 +569,7 @@
|
||||
goto exit_free_irq;
|
||||
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
- fintek->rdev = rdev;
|
||||
+
|
||||
fit_pr(KERN_NOTICE, "driver has been successfully loaded\n");
|
||||
if (debug)
|
||||
cir_dump_regs(fintek);
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/ite-cir.c linux-3.6.11.patch/drivers/media/rc/ite-cir.c
|
||||
--- linux-3.6.11/drivers/media/rc/ite-cir.c 2012-12-28 22:59:21.808868854 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/ite-cir.c 2012-12-28 22:59:37.533767672 +0100
|
||||
@@ -1591,6 +1591,8 @@
|
||||
rdev->driver_name = ITE_DRIVER_NAME;
|
||||
rdev->map_name = RC_MAP_RC6_MCE;
|
||||
|
||||
+ itdev->rdev = rdev;
|
||||
+
|
||||
ret = -EBUSY;
|
||||
/* now claim resources */
|
||||
if (!request_region(itdev->cir_addr,
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/nuvoton-cir.c linux-3.6.11.patch/drivers/media/rc/nuvoton-cir.c
|
||||
--- linux-3.6.11/drivers/media/rc/nuvoton-cir.c 2012-12-28 22:59:21.807868860 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/nuvoton-cir.c 2012-12-28 22:59:37.533767672 +0100
|
||||
@@ -1065,6 +1065,7 @@
|
||||
/* tx bits */
|
||||
rdev->tx_resolution = XYZ;
|
||||
#endif
|
||||
+ nvt->rdev = rdev;
|
||||
|
||||
ret = -EBUSY;
|
||||
/* now claim resources */
|
||||
@@ -1089,7 +1090,7 @@
|
||||
goto exit_free_wake_irq;
|
||||
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
- nvt->rdev = rdev;
|
||||
+
|
||||
nvt_pr(KERN_NOTICE, "driver has been successfully loaded\n");
|
||||
if (debug) {
|
||||
cir_dump_regs(nvt);
|
@ -1,174 +0,0 @@
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/ene_ir.c linux-3.6.11.patch/drivers/media/rc/ene_ir.c
|
||||
--- linux-3.6.11/drivers/media/rc/ene_ir.c 2012-12-28 23:03:21.859277264 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/ene_ir.c 2012-12-28 23:03:33.651196525 +0100
|
||||
@@ -1072,10 +1072,14 @@
|
||||
device_set_wakeup_capable(&pnp_dev->dev, true);
|
||||
device_set_wakeup_enable(&pnp_dev->dev, true);
|
||||
|
||||
+ error = rc_register_device(rdev);
|
||||
+ if (error < 0)
|
||||
+ goto exit_free_dev_rdev;
|
||||
+
|
||||
/* claim the resources */
|
||||
error = -EBUSY;
|
||||
if (!request_region(dev->hw_io, ENE_IO_SIZE, ENE_DRIVER_NAME)) {
|
||||
- goto exit_free_dev_rdev;
|
||||
+ goto exit_unregister_device;
|
||||
}
|
||||
|
||||
dev->irq = pnp_irq(pnp_dev, 0);
|
||||
@@ -1084,17 +1088,13 @@
|
||||
goto exit_release_hw_io;
|
||||
}
|
||||
|
||||
- error = rc_register_device(rdev);
|
||||
- if (error < 0)
|
||||
- goto exit_free_irq;
|
||||
-
|
||||
pr_notice("driver has been successfully loaded\n");
|
||||
return 0;
|
||||
|
||||
-exit_free_irq:
|
||||
- free_irq(dev->irq, dev);
|
||||
exit_release_hw_io:
|
||||
release_region(dev->hw_io, ENE_IO_SIZE);
|
||||
+exit_unregister_device:
|
||||
+ rc_unregister_device(rdev);
|
||||
exit_free_dev_rdev:
|
||||
rc_free_device(rdev);
|
||||
kfree(dev);
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/ite-cir.c linux-3.6.11.patch/drivers/media/rc/ite-cir.c
|
||||
--- linux-3.6.11/drivers/media/rc/ite-cir.c 2012-12-28 23:03:21.858277269 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/ite-cir.c 2012-12-28 23:06:45.772856073 +0100
|
||||
@@ -1593,29 +1593,29 @@
|
||||
|
||||
itdev->rdev = rdev;
|
||||
|
||||
+ ret = rc_register_device(rdev);
|
||||
+ if (ret)
|
||||
+ goto exit_free_dev_rdev;
|
||||
+
|
||||
ret = -EBUSY;
|
||||
/* now claim resources */
|
||||
if (!request_region(itdev->cir_addr,
|
||||
dev_desc->io_region_size, ITE_DRIVER_NAME))
|
||||
- goto exit_free_dev_rdev;
|
||||
+ goto exit_unregister_device;
|
||||
|
||||
|
||||
if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED,
|
||||
ITE_DRIVER_NAME, (void *)itdev))
|
||||
goto exit_release_cir_addr;
|
||||
|
||||
- ret = rc_register_device(rdev);
|
||||
- if (ret)
|
||||
- goto exit_free_irq;
|
||||
-
|
||||
ite_pr(KERN_NOTICE, "driver has been successfully loaded\n");
|
||||
|
||||
return 0;
|
||||
|
||||
-exit_free_irq:
|
||||
- free_irq(itdev->cir_irq, itdev);
|
||||
exit_release_cir_addr:
|
||||
release_region(itdev->cir_addr, itdev->params.io_region_size);
|
||||
+exit_unregister_device:
|
||||
+ rc_unregister_device(rdev);
|
||||
exit_free_dev_rdev:
|
||||
rc_free_device(rdev);
|
||||
kfree(itdev);
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/nuvoton-cir.c linux-3.6.11.patch/drivers/media/rc/nuvoton-cir.c
|
||||
--- linux-3.6.11/drivers/media/rc/nuvoton-cir.c 2012-12-28 23:03:21.858277269 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/nuvoton-cir.c 2012-12-28 23:03:33.653196511 +0100
|
||||
@@ -1067,11 +1067,15 @@
|
||||
#endif
|
||||
nvt->rdev = rdev;
|
||||
|
||||
+ ret = rc_register_device(rdev);
|
||||
+ if (ret)
|
||||
+ goto exit_free_dev_rdev;
|
||||
+
|
||||
ret = -EBUSY;
|
||||
/* now claim resources */
|
||||
if (!request_region(nvt->cir_addr,
|
||||
CIR_IOREG_LENGTH, NVT_DRIVER_NAME))
|
||||
- goto exit_free_dev_rdev;
|
||||
+ goto exit_unregister_device;
|
||||
|
||||
if (request_irq(nvt->cir_irq, nvt_cir_isr, IRQF_SHARED,
|
||||
NVT_DRIVER_NAME, (void *)nvt))
|
||||
@@ -1085,10 +1089,6 @@
|
||||
NVT_DRIVER_NAME, (void *)nvt))
|
||||
goto exit_release_cir_wake_addr;
|
||||
|
||||
- ret = rc_register_device(rdev);
|
||||
- if (ret)
|
||||
- goto exit_free_wake_irq;
|
||||
-
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
|
||||
nvt_pr(KERN_NOTICE, "driver has been successfully loaded\n");
|
||||
@@ -1099,14 +1099,14 @@
|
||||
|
||||
return 0;
|
||||
|
||||
-exit_free_wake_irq:
|
||||
- free_irq(nvt->cir_wake_irq, nvt);
|
||||
exit_release_cir_wake_addr:
|
||||
release_region(nvt->cir_wake_addr, CIR_IOREG_LENGTH);
|
||||
exit_free_irq:
|
||||
free_irq(nvt->cir_irq, nvt);
|
||||
exit_release_cir_addr:
|
||||
release_region(nvt->cir_addr, CIR_IOREG_LENGTH);
|
||||
+exit_unregister_device:
|
||||
+ rc_unregister_device(rdev);
|
||||
exit_free_dev_rdev:
|
||||
rc_free_device(rdev);
|
||||
kfree(nvt);
|
||||
diff -Naur linux-3.6.11/drivers/media/rc/winbond-cir.c linux-3.6.11.patch/drivers/media/rc/winbond-cir.c
|
||||
--- linux-3.6.11/drivers/media/rc/winbond-cir.c 2012-12-28 23:03:21.858277269 +0100
|
||||
+++ linux-3.6.11.patch/drivers/media/rc/winbond-cir.c 2012-12-28 23:03:33.653196511 +0100
|
||||
@@ -1035,11 +1035,15 @@
|
||||
data->dev->timeout = MS_TO_NS(100);
|
||||
data->dev->allowed_protos = RC_TYPE_ALL;
|
||||
|
||||
+ err = rc_register_device(data->dev);
|
||||
+ if (err)
|
||||
+ goto exit_free_rc;
|
||||
+
|
||||
if (!request_region(data->wbase, WAKEUP_IOMEM_LEN, DRVNAME)) {
|
||||
dev_err(dev, "Region 0x%lx-0x%lx already in use!\n",
|
||||
data->wbase, data->wbase + WAKEUP_IOMEM_LEN - 1);
|
||||
err = -EBUSY;
|
||||
- goto exit_free_rc;
|
||||
+ goto exit_unregister_device;
|
||||
}
|
||||
|
||||
if (!request_region(data->ebase, EHFUNC_IOMEM_LEN, DRVNAME)) {
|
||||
@@ -1064,24 +1068,20 @@
|
||||
goto exit_release_sbase;
|
||||
}
|
||||
|
||||
- err = rc_register_device(data->dev);
|
||||
- if (err)
|
||||
- goto exit_free_irq;
|
||||
-
|
||||
device_init_wakeup(&device->dev, 1);
|
||||
|
||||
wbcir_init_hw(data);
|
||||
|
||||
return 0;
|
||||
|
||||
-exit_free_irq:
|
||||
- free_irq(data->irq, device);
|
||||
exit_release_sbase:
|
||||
release_region(data->sbase, SP_IOMEM_LEN);
|
||||
exit_release_ebase:
|
||||
release_region(data->ebase, EHFUNC_IOMEM_LEN);
|
||||
exit_release_wbase:
|
||||
release_region(data->wbase, WAKEUP_IOMEM_LEN);
|
||||
+exit_unregister_device:
|
||||
+ rc_unregister_device(data->dev);
|
||||
exit_free_rc:
|
||||
rc_free_device(data->dev);
|
||||
exit_unregister_led:
|
12142
packages/linux/patches/3.6.11/linux-221-ngene-octopus.patch
vendored
12142
packages/linux/patches/3.6.11/linux-221-ngene-octopus.patch
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,45 +0,0 @@
|
||||
The array channel_allocations[] is an ordered list, add function to get
|
||||
correct order by ca_index.
|
||||
|
||||
Signed-off-by: Wang Xingchao <xingchao.wang at intel.com>
|
||||
---
|
||||
sound/pci/hda/patch_hdmi.c | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
|
||||
index d9439c5..6ac21d4 100644
|
||||
--- a/sound/pci/hda/patch_hdmi.c
|
||||
+++ b/sound/pci/hda/patch_hdmi.c
|
||||
@@ -469,6 +469,17 @@ static void init_channel_allocations(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static int get_channel_allocation_order(int ca)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(channel_allocations); i++) {
|
||||
+ if (channel_allocations[i].ca_index == ca)
|
||||
+ break;
|
||||
+ }
|
||||
+ return i;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* The transformation takes two steps:
|
||||
*
|
||||
@@ -541,9 +552,11 @@ static void hdmi_setup_channel_mapping(struct hda_codec *codec,
|
||||
{
|
||||
int i;
|
||||
int err;
|
||||
+ int order;
|
||||
|
||||
+ order = get_channel_allocation_order(ca);
|
||||
if (hdmi_channel_mapping[ca][1] == 0) {
|
||||
- for (i = 0; i < channel_allocations[ca].channels; i++)
|
||||
+ for (i = 0; i < channel_allocations[order].channels; i++)
|
||||
hdmi_channel_mapping[ca][i] = i | (i << 4);
|
||||
for (; i < 8; i++)
|
||||
hdmi_channel_mapping[ca][i] = 0xf | (i << 4);
|
||||
--
|
||||
1.7.9.5
|
@ -1,130 +0,0 @@
|
||||
HDMI channel remapping apparently effects HBR packets on Intel's chips.
|
||||
For compressed non-PCM audio, use "straight-through" channel mapping.
|
||||
For uncompressed multi-channel pcm audio, use normal channel mapping.
|
||||
|
||||
Signed-off-by: Wang Xingchao <xingchao.wang at intel.com>
|
||||
---
|
||||
sound/pci/hda/patch_hdmi.c | 36 ++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 32 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
|
||||
index 6ac21d4..a87f8b2 100644
|
||||
--- a/sound/pci/hda/patch_hdmi.c
|
||||
+++ b/sound/pci/hda/patch_hdmi.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <sound/core.h>
|
||||
#include <sound/jack.h>
|
||||
+#include <sound/asoundef.h>
|
||||
#include "hda_codec.h"
|
||||
#include "hda_local.h"
|
||||
#include "hda_jack.h"
|
||||
@@ -60,6 +61,7 @@ struct hdmi_spec_per_cvt {
|
||||
u32 rates;
|
||||
u64 formats;
|
||||
unsigned int maxbps;
|
||||
+ bool non_pcm;
|
||||
};
|
||||
|
||||
struct hdmi_spec_per_pin {
|
||||
@@ -548,13 +550,17 @@ static void hdmi_debug_channel_mapping(struct hda_codec *codec,
|
||||
|
||||
static void hdmi_setup_channel_mapping(struct hda_codec *codec,
|
||||
hda_nid_t pin_nid,
|
||||
+ hda_nid_t cvt_nid,
|
||||
+ bool non_pcm,
|
||||
int ca)
|
||||
{
|
||||
int i;
|
||||
int err;
|
||||
int order;
|
||||
+ int non_pcm_mapping[8];
|
||||
|
||||
order = get_channel_allocation_order(ca);
|
||||
+
|
||||
if (hdmi_channel_mapping[ca][1] == 0) {
|
||||
for (i = 0; i < channel_allocations[order].channels; i++)
|
||||
hdmi_channel_mapping[ca][i] = i | (i << 4);
|
||||
@@ -562,10 +568,17 @@ static void hdmi_setup_channel_mapping(struct hda_codec *codec,
|
||||
hdmi_channel_mapping[ca][i] = 0xf | (i << 4);
|
||||
}
|
||||
|
||||
+ if (non_pcm) {
|
||||
+ for (i = 0; i < channel_allocations[order].channels; i++)
|
||||
+ non_pcm_mapping[i] = i | (i << 4);
|
||||
+ for (; i < 8; i++)
|
||||
+ non_pcm_mapping[i] = 0xf | (i << 4);
|
||||
+ }
|
||||
+
|
||||
for (i = 0; i < 8; i++) {
|
||||
err = snd_hda_codec_write(codec, pin_nid, 0,
|
||||
AC_VERB_SET_HDMI_CHAN_SLOT,
|
||||
- hdmi_channel_mapping[ca][i]);
|
||||
+ non_pcm ? non_pcm_mapping[i] : hdmi_channel_mapping[ca][i]);
|
||||
if (err) {
|
||||
snd_printdd(KERN_NOTICE
|
||||
"HDMI: channel mapping failed\n");
|
||||
@@ -699,15 +712,27 @@ static bool hdmi_infoframe_uptodate(struct hda_codec *codec, hda_nid_t pin_nid,
|
||||
}
|
||||
|
||||
static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
|
||||
- struct snd_pcm_substream *substream)
|
||||
+ hda_nid_t cvt_nid, struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct hdmi_spec *spec = codec->spec;
|
||||
struct hdmi_spec_per_pin *per_pin = &spec->pins[pin_idx];
|
||||
+ struct hdmi_spec_per_cvt *per_cvt;
|
||||
+ struct hda_spdif_out *spdif;
|
||||
hda_nid_t pin_nid = per_pin->pin_nid;
|
||||
int channels = substream->runtime->channels;
|
||||
struct hdmi_eld *eld;
|
||||
int ca;
|
||||
+ int cvt_idx;
|
||||
union audio_infoframe ai;
|
||||
+ bool non_pcm = false;
|
||||
+
|
||||
+ cvt_idx = cvt_nid_to_cvt_index(spec, cvt_nid);
|
||||
+ per_cvt = &spec->cvts[cvt_idx];
|
||||
+
|
||||
+ mutex_lock(&codec->spdif_mutex);
|
||||
+ spdif = snd_hda_spdif_out_of_nid(codec, cvt_nid);
|
||||
+ non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO);
|
||||
+ mutex_unlock(&codec->spdif_mutex);
|
||||
|
||||
eld = &spec->pins[pin_idx].sink_eld;
|
||||
if (!eld->monitor_present)
|
||||
@@ -750,12 +775,14 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
|
||||
"pin=%d channels=%d\n",
|
||||
pin_nid,
|
||||
channels);
|
||||
- hdmi_setup_channel_mapping(codec, pin_nid, ca);
|
||||
+ hdmi_setup_channel_mapping(codec, pin_nid, cvt_nid, non_pcm, ca);
|
||||
hdmi_stop_infoframe_trans(codec, pin_nid);
|
||||
hdmi_fill_audio_infoframe(codec, pin_nid,
|
||||
ai.bytes, sizeof(ai));
|
||||
hdmi_start_infoframe_trans(codec, pin_nid);
|
||||
}
|
||||
+
|
||||
+ per_cvt->non_pcm = non_pcm;
|
||||
}
|
||||
|
||||
|
||||
@@ -1077,6 +1104,7 @@ static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t cvt_nid)
|
||||
|
||||
per_cvt->cvt_nid = cvt_nid;
|
||||
per_cvt->channels_min = 2;
|
||||
+ per_cvt->non_pcm = false;
|
||||
if (chans <= 16)
|
||||
per_cvt->channels_max = chans;
|
||||
|
||||
@@ -1164,7 +1192,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
|
||||
|
||||
hdmi_set_channel_count(codec, cvt_nid, substream->runtime->channels);
|
||||
|
||||
- hdmi_setup_audio_infoframe(codec, pin_idx, substream);
|
||||
+ hdmi_setup_audio_infoframe(codec, pin_idx, cvt_nid, substream);
|
||||
|
||||
pinctl = snd_hda_codec_read(codec, pin_nid, 0,
|
||||
AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
|
||||
--
|
||||
1.7.9.5
|
@ -1,27 +0,0 @@
|
||||
For HBR stream test, use straight channel mapping way.
|
||||
when switched back to "speaker-test -c8", even the audio
|
||||
infoframe is up-to-date, there should be correct channel mapping setup.
|
||||
|
||||
Signed-off-by: Wang Xingchao <xingchao.wang at intel.com>
|
||||
---
|
||||
sound/pci/hda/patch_hdmi.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
|
||||
index a87f8b2..bcb0939 100644
|
||||
--- a/sound/pci/hda/patch_hdmi.c
|
||||
+++ b/sound/pci/hda/patch_hdmi.c
|
||||
@@ -780,6 +780,11 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, int pin_idx,
|
||||
hdmi_fill_audio_infoframe(codec, pin_nid,
|
||||
ai.bytes, sizeof(ai));
|
||||
hdmi_start_infoframe_trans(codec, pin_nid);
|
||||
+ } else {
|
||||
+ /* For non-pcm audio switch, setup new channel mapping
|
||||
+ * accordingly */
|
||||
+ if (per_cvt->non_pcm != non_pcm)
|
||||
+ hdmi_setup_channel_mapping(codec, pin_nid, cvt_nid, non_pcm, ca);
|
||||
}
|
||||
|
||||
per_cvt->non_pcm = non_pcm;
|
||||
--
|
||||
1.7.9.5
|
@ -1,29 +0,0 @@
|
||||
From: Francois Romieu <romieu@fr.zoreil.com>
|
||||
Date: Fri, 31 Aug 2012 21:06:17 +0000 (+0200)
|
||||
Subject: r8169: add D-Link DGE-560T identifiers.
|
||||
X-Git-Tag: v3.7-rc1~145^2~236
|
||||
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fstable%2Flinux-stable.git;a=commitdiff_plain;h=2a35cfa591ac63f17815c2d9432b799e37527980;hp=da210f559019ba1cd4ebee2a28ad158bfb95bab2
|
||||
|
||||
r8169: add D-Link DGE-560T identifiers.
|
||||
|
||||
This one includes a 8168. Not to be confused with the sky2 driven
|
||||
one whose PCI vendor and device ID are the same.
|
||||
|
||||
Reported-by: Neyuki Inaya <in@joblog.ru>
|
||||
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
|
||||
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
|
||||
index b47d5b3..0c96604 100644
|
||||
--- a/drivers/net/ethernet/realtek/r8169.c
|
||||
+++ b/drivers/net/ethernet/realtek/r8169.c
|
||||
@@ -287,6 +287,8 @@ static DEFINE_PCI_DEVICE_TABLE(rtl8169_pci_tbl) = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8167), 0, 0, RTL_CFG_0 },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8168), 0, 0, RTL_CFG_1 },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8169), 0, 0, RTL_CFG_0 },
|
||||
+ { PCI_VENDOR_ID_DLINK, 0x4300,
|
||||
+ PCI_VENDOR_ID_DLINK, 0x4b10, 0, 0, RTL_CFG_1 },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4300), 0, 0, RTL_CFG_0 },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_DLINK, 0x4302), 0, 0, RTL_CFG_0 },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_AT, 0xc107), 0, 0, RTL_CFG_0 },
|
Loading…
x
Reference in New Issue
Block a user