diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/Kconfig | 2 | ||||
-rw-r--r-- | drivers/char/agp/amd-k7-agp.c | 4 | ||||
-rw-r--r-- | drivers/char/agp/amd64-agp.c | 6 | ||||
-rw-r--r-- | drivers/char/drm/drm_pciids.h | 2 | ||||
-rw-r--r-- | drivers/char/drm/sis_drv.h | 8 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 10 | ||||
-rw-r--r-- | drivers/char/keyboard.c | 4 | ||||
-rw-r--r-- | drivers/char/mem.c | 9 | ||||
-rw-r--r-- | drivers/char/stallion.c | 7 | ||||
-rw-r--r-- | drivers/char/sx.c | 4 | ||||
-rw-r--r-- | drivers/char/vr41xx_giu.c | 132 | ||||
-rw-r--r-- | drivers/char/vt.c | 18 |
12 files changed, 73 insertions, 133 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index ef683ebd367c..a31c6d2c061f 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -815,7 +815,7 @@ config SGI_IP27_RTC | |||
815 | 815 | ||
816 | config GEN_RTC | 816 | config GEN_RTC |
817 | tristate "Generic /dev/rtc emulation" | 817 | tristate "Generic /dev/rtc emulation" |
818 | depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC && !FRV && !S390 && !SUPERH | 818 | depends on RTC!=y && !IA64 && !ARM && !M32R && !MIPS && !SPARC && !FRV && !S390 && !SUPERH |
819 | ---help--- | 819 | ---help--- |
820 | If you say Y here and create a character special file /dev/rtc with | 820 | If you say Y here and create a character special file /dev/rtc with |
821 | major number 10 and minor number 135 using mknod ("man mknod"), you | 821 | major number 10 and minor number 135 using mknod ("man mknod"), you |
diff --git a/drivers/char/agp/amd-k7-agp.c b/drivers/char/agp/amd-k7-agp.c index e6c534e62846..df0ddf14b85c 100644 --- a/drivers/char/agp/amd-k7-agp.c +++ b/drivers/char/agp/amd-k7-agp.c | |||
@@ -462,9 +462,7 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev, | |||
462 | * erratum 46: Setup violation on AGP SBA pins - Disable side band addressing. | 462 | * erratum 46: Setup violation on AGP SBA pins - Disable side band addressing. |
463 | * With this lot disabled, we should prevent lockups. */ | 463 | * With this lot disabled, we should prevent lockups. */ |
464 | if (agp_bridge->dev->device == PCI_DEVICE_ID_AMD_FE_GATE_700E) { | 464 | if (agp_bridge->dev->device == PCI_DEVICE_ID_AMD_FE_GATE_700E) { |
465 | u8 revision=0; | 465 | if (pdev->revision == 0x10 || pdev->revision == 0x11) { |
466 | pci_read_config_byte(pdev, PCI_REVISION_ID, &revision); | ||
467 | if (revision == 0x10 || revision == 0x11) { | ||
468 | agp_bridge->flags = AGP_ERRATA_FASTWRITES; | 466 | agp_bridge->flags = AGP_ERRATA_FASTWRITES; |
469 | agp_bridge->flags |= AGP_ERRATA_SBA; | 467 | agp_bridge->flags |= AGP_ERRATA_SBA; |
470 | agp_bridge->flags |= AGP_ERRATA_1X; | 468 | agp_bridge->flags |= AGP_ERRATA_1X; |
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 801abdd29066..d95662e96326 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c | |||
@@ -367,10 +367,8 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr) | |||
367 | static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge) | 367 | static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge) |
368 | { | 368 | { |
369 | char *revstring; | 369 | char *revstring; |
370 | u8 rev_id; | ||
371 | 370 | ||
372 | pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id); | 371 | switch (pdev->revision) { |
373 | switch (rev_id) { | ||
374 | case 0x01: revstring="A0"; break; | 372 | case 0x01: revstring="A0"; break; |
375 | case 0x02: revstring="A1"; break; | 373 | case 0x02: revstring="A1"; break; |
376 | case 0x11: revstring="B0"; break; | 374 | case 0x11: revstring="B0"; break; |
@@ -386,7 +384,7 @@ static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data | |||
386 | * Work around errata. | 384 | * Work around errata. |
387 | * Chips before B2 stepping incorrectly reporting v3.5 | 385 | * Chips before B2 stepping incorrectly reporting v3.5 |
388 | */ | 386 | */ |
389 | if (rev_id < 0x13) { | 387 | if (pdev->revision < 0x13) { |
390 | printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n"); | 388 | printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n"); |
391 | bridge->major_version = 3; | 389 | bridge->major_version = 3; |
392 | bridge->minor_version = 0; | 390 | bridge->minor_version = 0; |
diff --git a/drivers/char/drm/drm_pciids.h b/drivers/char/drm/drm_pciids.h index aa6335032d1e..30b200b01314 100644 --- a/drivers/char/drm/drm_pciids.h +++ b/drivers/char/drm/drm_pciids.h | |||
@@ -219,6 +219,8 @@ | |||
219 | {0x1039, 0x6300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 219 | {0x1039, 0x6300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
220 | {0x1039, 0x6330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \ | 220 | {0x1039, 0x6330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \ |
221 | {0x1039, 0x7300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ | 221 | {0x1039, 0x7300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ |
222 | {0x18CA, 0x0040, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \ | ||
223 | {0x18CA, 0x0042, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \ | ||
222 | {0, 0, 0} | 224 | {0, 0, 0} |
223 | 225 | ||
224 | #define tdfx_PCI_IDS \ | 226 | #define tdfx_PCI_IDS \ |
diff --git a/drivers/char/drm/sis_drv.h b/drivers/char/drm/sis_drv.h index 2b8d6f6ed7c0..70d4ede75fe8 100644 --- a/drivers/char/drm/sis_drv.h +++ b/drivers/char/drm/sis_drv.h | |||
@@ -33,11 +33,11 @@ | |||
33 | 33 | ||
34 | #define DRIVER_AUTHOR "SIS, Tungsten Graphics" | 34 | #define DRIVER_AUTHOR "SIS, Tungsten Graphics" |
35 | #define DRIVER_NAME "sis" | 35 | #define DRIVER_NAME "sis" |
36 | #define DRIVER_DESC "SIS 300/630/540" | 36 | #define DRIVER_DESC "SIS 300/630/540 and XGI V3XE/V5/V8" |
37 | #define DRIVER_DATE "20060704" | 37 | #define DRIVER_DATE "20070626" |
38 | #define DRIVER_MAJOR 1 | 38 | #define DRIVER_MAJOR 1 |
39 | #define DRIVER_MINOR 2 | 39 | #define DRIVER_MINOR 3 |
40 | #define DRIVER_PATCHLEVEL 1 | 40 | #define DRIVER_PATCHLEVEL 0 |
41 | 41 | ||
42 | enum sis_family { | 42 | enum sis_family { |
43 | SIS_OTHER = 0, | 43 | SIS_OTHER = 0, |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 8e222f2b80cc..b5df7e61aeb2 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -2171,52 +2171,42 @@ static int create_files(struct bmc_device *bmc) | |||
2171 | int err; | 2171 | int err; |
2172 | 2172 | ||
2173 | bmc->device_id_attr.attr.name = "device_id"; | 2173 | bmc->device_id_attr.attr.name = "device_id"; |
2174 | bmc->device_id_attr.attr.owner = THIS_MODULE; | ||
2175 | bmc->device_id_attr.attr.mode = S_IRUGO; | 2174 | bmc->device_id_attr.attr.mode = S_IRUGO; |
2176 | bmc->device_id_attr.show = device_id_show; | 2175 | bmc->device_id_attr.show = device_id_show; |
2177 | 2176 | ||
2178 | bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs"; | 2177 | bmc->provides_dev_sdrs_attr.attr.name = "provides_device_sdrs"; |
2179 | bmc->provides_dev_sdrs_attr.attr.owner = THIS_MODULE; | ||
2180 | bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO; | 2178 | bmc->provides_dev_sdrs_attr.attr.mode = S_IRUGO; |
2181 | bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show; | 2179 | bmc->provides_dev_sdrs_attr.show = provides_dev_sdrs_show; |
2182 | 2180 | ||
2183 | bmc->revision_attr.attr.name = "revision"; | 2181 | bmc->revision_attr.attr.name = "revision"; |
2184 | bmc->revision_attr.attr.owner = THIS_MODULE; | ||
2185 | bmc->revision_attr.attr.mode = S_IRUGO; | 2182 | bmc->revision_attr.attr.mode = S_IRUGO; |
2186 | bmc->revision_attr.show = revision_show; | 2183 | bmc->revision_attr.show = revision_show; |
2187 | 2184 | ||
2188 | bmc->firmware_rev_attr.attr.name = "firmware_revision"; | 2185 | bmc->firmware_rev_attr.attr.name = "firmware_revision"; |
2189 | bmc->firmware_rev_attr.attr.owner = THIS_MODULE; | ||
2190 | bmc->firmware_rev_attr.attr.mode = S_IRUGO; | 2186 | bmc->firmware_rev_attr.attr.mode = S_IRUGO; |
2191 | bmc->firmware_rev_attr.show = firmware_rev_show; | 2187 | bmc->firmware_rev_attr.show = firmware_rev_show; |
2192 | 2188 | ||
2193 | bmc->version_attr.attr.name = "ipmi_version"; | 2189 | bmc->version_attr.attr.name = "ipmi_version"; |
2194 | bmc->version_attr.attr.owner = THIS_MODULE; | ||
2195 | bmc->version_attr.attr.mode = S_IRUGO; | 2190 | bmc->version_attr.attr.mode = S_IRUGO; |
2196 | bmc->version_attr.show = ipmi_version_show; | 2191 | bmc->version_attr.show = ipmi_version_show; |
2197 | 2192 | ||
2198 | bmc->add_dev_support_attr.attr.name = "additional_device_support"; | 2193 | bmc->add_dev_support_attr.attr.name = "additional_device_support"; |
2199 | bmc->add_dev_support_attr.attr.owner = THIS_MODULE; | ||
2200 | bmc->add_dev_support_attr.attr.mode = S_IRUGO; | 2194 | bmc->add_dev_support_attr.attr.mode = S_IRUGO; |
2201 | bmc->add_dev_support_attr.show = add_dev_support_show; | 2195 | bmc->add_dev_support_attr.show = add_dev_support_show; |
2202 | 2196 | ||
2203 | bmc->manufacturer_id_attr.attr.name = "manufacturer_id"; | 2197 | bmc->manufacturer_id_attr.attr.name = "manufacturer_id"; |
2204 | bmc->manufacturer_id_attr.attr.owner = THIS_MODULE; | ||
2205 | bmc->manufacturer_id_attr.attr.mode = S_IRUGO; | 2198 | bmc->manufacturer_id_attr.attr.mode = S_IRUGO; |
2206 | bmc->manufacturer_id_attr.show = manufacturer_id_show; | 2199 | bmc->manufacturer_id_attr.show = manufacturer_id_show; |
2207 | 2200 | ||
2208 | bmc->product_id_attr.attr.name = "product_id"; | 2201 | bmc->product_id_attr.attr.name = "product_id"; |
2209 | bmc->product_id_attr.attr.owner = THIS_MODULE; | ||
2210 | bmc->product_id_attr.attr.mode = S_IRUGO; | 2202 | bmc->product_id_attr.attr.mode = S_IRUGO; |
2211 | bmc->product_id_attr.show = product_id_show; | 2203 | bmc->product_id_attr.show = product_id_show; |
2212 | 2204 | ||
2213 | bmc->guid_attr.attr.name = "guid"; | 2205 | bmc->guid_attr.attr.name = "guid"; |
2214 | bmc->guid_attr.attr.owner = THIS_MODULE; | ||
2215 | bmc->guid_attr.attr.mode = S_IRUGO; | 2206 | bmc->guid_attr.attr.mode = S_IRUGO; |
2216 | bmc->guid_attr.show = guid_show; | 2207 | bmc->guid_attr.show = guid_show; |
2217 | 2208 | ||
2218 | bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision"; | 2209 | bmc->aux_firmware_rev_attr.attr.name = "aux_firmware_revision"; |
2219 | bmc->aux_firmware_rev_attr.attr.owner = THIS_MODULE; | ||
2220 | bmc->aux_firmware_rev_attr.attr.mode = S_IRUGO; | 2210 | bmc->aux_firmware_rev_attr.attr.mode = S_IRUGO; |
2221 | bmc->aux_firmware_rev_attr.show = aux_firmware_rev_show; | 2211 | bmc->aux_firmware_rev_attr.show = aux_firmware_rev_show; |
2222 | 2212 | ||
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 1b094509b1d2..90965b4def5c 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -1005,8 +1005,8 @@ static const unsigned short x86_keycodes[256] = | |||
1005 | 284,285,309, 0,312, 91,327,328,329,331,333,335,336,337,338,339, | 1005 | 284,285,309, 0,312, 91,327,328,329,331,333,335,336,337,338,339, |
1006 | 367,288,302,304,350, 89,334,326,267,126,268,269,125,347,348,349, | 1006 | 367,288,302,304,350, 89,334,326,267,126,268,269,125,347,348,349, |
1007 | 360,261,262,263,268,376,100,101,321,316,373,286,289,102,351,355, | 1007 | 360,261,262,263,268,376,100,101,321,316,373,286,289,102,351,355, |
1008 | 103,104,105,275,287,279,306,106,274,107,294,364,358,363,362,361, | 1008 | 103,104,105,275,287,279,258,106,274,107,294,364,358,363,362,361, |
1009 | 291,108,381,281,290,272,292,305,280, 99,112,257,258,359,113,114, | 1009 | 291,108,381,281,290,272,292,305,280, 99,112,257,306,359,113,114, |
1010 | 264,117,271,374,379,265,266, 93, 94, 95, 85,259,375,260, 90,116, | 1010 | 264,117,271,374,379,265,266, 93, 94, 95, 85,259,375,260, 90,116, |
1011 | 377,109,111,277,278,282,283,295,296,297,299,300,301,293,303,307, | 1011 | 377,109,111,277,278,282,283,295,296,297,299,300,301,293,303,307, |
1012 | 308,310,313,314,315,317,318,319,320,357,322,323,324,325,276,330, | 1012 | 308,310,313,314,315,317,318,319,320,357,322,323,324,325,276,330, |
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index cc9a9d0df979..bbee97ff355f 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <linux/crash_dump.h> | 24 | #include <linux/crash_dump.h> |
25 | #include <linux/backing-dev.h> | 25 | #include <linux/backing-dev.h> |
26 | #include <linux/bootmem.h> | 26 | #include <linux/bootmem.h> |
27 | #include <linux/pipe_fs_i.h> | 27 | #include <linux/splice.h> |
28 | #include <linux/pfn.h> | 28 | #include <linux/pfn.h> |
29 | 29 | ||
30 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
@@ -75,6 +75,13 @@ static inline int uncached_access(struct file *file, unsigned long addr) | |||
75 | * On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases. | 75 | * On ia64, we ignore O_SYNC because we cannot tolerate memory attribute aliases. |
76 | */ | 76 | */ |
77 | return !(efi_mem_attributes(addr) & EFI_MEMORY_WB); | 77 | return !(efi_mem_attributes(addr) & EFI_MEMORY_WB); |
78 | #elif defined(CONFIG_MIPS) | ||
79 | { | ||
80 | extern int __uncached_access(struct file *file, | ||
81 | unsigned long addr); | ||
82 | |||
83 | return __uncached_access(file, addr); | ||
84 | } | ||
78 | #else | 85 | #else |
79 | /* | 86 | /* |
80 | * Accessing memory above the top the kernel knows about or through a file pointer | 87 | * Accessing memory above the top the kernel knows about or through a file pointer |
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 45bf2a262a85..8c73ccb8830f 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -4753,13 +4753,14 @@ static int __init stallion_module_init(void) | |||
4753 | brdp->ioaddr2 = conf.ioaddr2; | 4753 | brdp->ioaddr2 = conf.ioaddr2; |
4754 | brdp->irq = conf.irq; | 4754 | brdp->irq = conf.irq; |
4755 | brdp->irqtype = conf.irqtype; | 4755 | brdp->irqtype = conf.irqtype; |
4756 | if (stl_brdinit(brdp)) | 4756 | stl_brds[brdp->brdnr] = brdp; |
4757 | if (stl_brdinit(brdp)) { | ||
4758 | stl_brds[brdp->brdnr] = NULL; | ||
4757 | kfree(brdp); | 4759 | kfree(brdp); |
4758 | else { | 4760 | } else { |
4759 | for (j = 0; j < brdp->nrports; j++) | 4761 | for (j = 0; j < brdp->nrports; j++) |
4760 | tty_register_device(stl_serial, | 4762 | tty_register_device(stl_serial, |
4761 | brdp->brdnr * STL_MAXPORTS + j, NULL); | 4763 | brdp->brdnr * STL_MAXPORTS + j, NULL); |
4762 | stl_brds[brdp->brdnr] = brdp; | ||
4763 | stl_nrbrds = i + 1; | 4764 | stl_nrbrds = i + 1; |
4764 | } | 4765 | } |
4765 | } | 4766 | } |
diff --git a/drivers/char/sx.c b/drivers/char/sx.c index 1da92a689ae4..85a23283dff5 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c | |||
@@ -2721,9 +2721,9 @@ static void __devexit sx_pci_remove(struct pci_dev *pdev) | |||
2721 | its because the standard requires it. So check for SUBVENDOR_ID. */ | 2721 | its because the standard requires it. So check for SUBVENDOR_ID. */ |
2722 | static struct pci_device_id sx_pci_tbl[] = { | 2722 | static struct pci_device_id sx_pci_tbl[] = { |
2723 | { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8, | 2723 | { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8, |
2724 | .subvendor = 0x0200,.subdevice = PCI_ANY_ID }, | 2724 | .subvendor = PCI_ANY_ID, .subdevice = 0x0200 }, |
2725 | { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8, | 2725 | { PCI_VENDOR_ID_SPECIALIX, PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8, |
2726 | .subvendor = 0x0300,.subdevice = PCI_ANY_ID }, | 2726 | .subvendor = PCI_ANY_ID, .subdevice = 0x0300 }, |
2727 | { 0 } | 2727 | { 0 } |
2728 | }; | 2728 | }; |
2729 | 2729 | ||
diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c index 0cea8d4907df..e5ed09192be8 100644 --- a/drivers/char/vr41xx_giu.c +++ b/drivers/char/vr41xx_giu.c | |||
@@ -19,18 +19,17 @@ | |||
19 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | */ | 21 | */ |
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
24 | #include <linux/fs.h> | 23 | #include <linux/fs.h> |
25 | #include <linux/init.h> | 24 | #include <linux/init.h> |
26 | #include <linux/irq.h> | ||
27 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/irq.h> | ||
28 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/platform_device.h> | ||
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | 32 | ||
33 | #include <asm/cpu.h> | ||
34 | #include <asm/io.h> | 33 | #include <asm/io.h> |
35 | #include <asm/vr41xx/giu.h> | 34 | #include <asm/vr41xx/giu.h> |
36 | #include <asm/vr41xx/irq.h> | 35 | #include <asm/vr41xx/irq.h> |
@@ -44,18 +43,6 @@ static int major; /* default is dynamic major device number */ | |||
44 | module_param(major, int, 0); | 43 | module_param(major, int, 0); |
45 | MODULE_PARM_DESC(major, "Major device number"); | 44 | MODULE_PARM_DESC(major, "Major device number"); |
46 | 45 | ||
47 | #define GIU_TYPE1_START 0x0b000100UL | ||
48 | #define GIU_TYPE1_SIZE 0x20UL | ||
49 | |||
50 | #define GIU_TYPE2_START 0x0f000140UL | ||
51 | #define GIU_TYPE2_SIZE 0x20UL | ||
52 | |||
53 | #define GIU_TYPE3_START 0x0f000140UL | ||
54 | #define GIU_TYPE3_SIZE 0x28UL | ||
55 | |||
56 | #define GIU_PULLUPDOWN_START 0x0b0002e0UL | ||
57 | #define GIU_PULLUPDOWN_SIZE 0x04UL | ||
58 | |||
59 | #define GIUIOSELL 0x00 | 46 | #define GIUIOSELL 0x00 |
60 | #define GIUIOSELH 0x02 | 47 | #define GIUIOSELH 0x02 |
61 | #define GIUPIODL 0x04 | 48 | #define GIUPIODL 0x04 |
@@ -89,8 +76,6 @@ MODULE_PARM_DESC(major, "Major device number"); | |||
89 | #define GPIO_HAS_INTERRUPT_EDGE_SELECT 0x0100 | 76 | #define GPIO_HAS_INTERRUPT_EDGE_SELECT 0x0100 |
90 | 77 | ||
91 | static spinlock_t giu_lock; | 78 | static spinlock_t giu_lock; |
92 | static struct resource *giu_resource1; | ||
93 | static struct resource *giu_resource2; | ||
94 | static unsigned long giu_flags; | 79 | static unsigned long giu_flags; |
95 | static unsigned int giu_nr_pins; | 80 | static unsigned int giu_nr_pins; |
96 | 81 | ||
@@ -234,7 +219,7 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, irq_signal_ | |||
234 | giu_set(GIUINTHTSELL, mask); | 219 | giu_set(GIUINTHTSELL, mask); |
235 | else | 220 | else |
236 | giu_clear(GIUINTHTSELL, mask); | 221 | giu_clear(GIUINTHTSELL, mask); |
237 | if (current_cpu_data.cputype == CPU_VR4133) { | 222 | if (giu_flags & GPIO_HAS_INTERRUPT_EDGE_SELECT) { |
238 | switch (trigger) { | 223 | switch (trigger) { |
239 | case IRQ_TRIGGER_EDGE_FALLING: | 224 | case IRQ_TRIGGER_EDGE_FALLING: |
240 | giu_set(GIUFEDGEINHL, mask); | 225 | giu_set(GIUFEDGEINHL, mask); |
@@ -269,7 +254,7 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, irq_signal_ | |||
269 | giu_set(GIUINTHTSELH, mask); | 254 | giu_set(GIUINTHTSELH, mask); |
270 | else | 255 | else |
271 | giu_clear(GIUINTHTSELH, mask); | 256 | giu_clear(GIUINTHTSELH, mask); |
272 | if (current_cpu_data.cputype == CPU_VR4133) { | 257 | if (giu_flags & GPIO_HAS_INTERRUPT_EDGE_SELECT) { |
273 | switch (trigger) { | 258 | switch (trigger) { |
274 | case IRQ_TRIGGER_EDGE_FALLING: | 259 | case IRQ_TRIGGER_EDGE_FALLING: |
275 | giu_set(GIUFEDGEINHH, mask); | 260 | giu_set(GIUFEDGEINHH, mask); |
@@ -298,7 +283,6 @@ void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, irq_signal_ | |||
298 | giu_write(GIUINTSTATH, mask); | 283 | giu_write(GIUINTSTATH, mask); |
299 | } | 284 | } |
300 | } | 285 | } |
301 | |||
302 | EXPORT_SYMBOL_GPL(vr41xx_set_irq_trigger); | 286 | EXPORT_SYMBOL_GPL(vr41xx_set_irq_trigger); |
303 | 287 | ||
304 | void vr41xx_set_irq_level(unsigned int pin, irq_level_t level) | 288 | void vr41xx_set_irq_level(unsigned int pin, irq_level_t level) |
@@ -321,7 +305,6 @@ void vr41xx_set_irq_level(unsigned int pin, irq_level_t level) | |||
321 | giu_write(GIUINTSTATH, mask); | 305 | giu_write(GIUINTSTATH, mask); |
322 | } | 306 | } |
323 | } | 307 | } |
324 | |||
325 | EXPORT_SYMBOL_GPL(vr41xx_set_irq_level); | 308 | EXPORT_SYMBOL_GPL(vr41xx_set_irq_level); |
326 | 309 | ||
327 | gpio_data_t vr41xx_gpio_get_pin(unsigned int pin) | 310 | gpio_data_t vr41xx_gpio_get_pin(unsigned int pin) |
@@ -350,7 +333,6 @@ gpio_data_t vr41xx_gpio_get_pin(unsigned int pin) | |||
350 | 333 | ||
351 | return GPIO_DATA_LOW; | 334 | return GPIO_DATA_LOW; |
352 | } | 335 | } |
353 | |||
354 | EXPORT_SYMBOL_GPL(vr41xx_gpio_get_pin); | 336 | EXPORT_SYMBOL_GPL(vr41xx_gpio_get_pin); |
355 | 337 | ||
356 | int vr41xx_gpio_set_pin(unsigned int pin, gpio_data_t data) | 338 | int vr41xx_gpio_set_pin(unsigned int pin, gpio_data_t data) |
@@ -388,7 +370,6 @@ int vr41xx_gpio_set_pin(unsigned int pin, gpio_data_t data) | |||
388 | 370 | ||
389 | return 0; | 371 | return 0; |
390 | } | 372 | } |
391 | |||
392 | EXPORT_SYMBOL_GPL(vr41xx_gpio_set_pin); | 373 | EXPORT_SYMBOL_GPL(vr41xx_gpio_set_pin); |
393 | 374 | ||
394 | int vr41xx_gpio_set_direction(unsigned int pin, gpio_direction_t dir) | 375 | int vr41xx_gpio_set_direction(unsigned int pin, gpio_direction_t dir) |
@@ -438,7 +419,6 @@ int vr41xx_gpio_set_direction(unsigned int pin, gpio_direction_t dir) | |||
438 | 419 | ||
439 | return 0; | 420 | return 0; |
440 | } | 421 | } |
441 | |||
442 | EXPORT_SYMBOL_GPL(vr41xx_gpio_set_direction); | 422 | EXPORT_SYMBOL_GPL(vr41xx_gpio_set_direction); |
443 | 423 | ||
444 | int vr41xx_gpio_pullupdown(unsigned int pin, gpio_pull_t pull) | 424 | int vr41xx_gpio_pullupdown(unsigned int pin, gpio_pull_t pull) |
@@ -477,7 +457,6 @@ int vr41xx_gpio_pullupdown(unsigned int pin, gpio_pull_t pull) | |||
477 | 457 | ||
478 | return 0; | 458 | return 0; |
479 | } | 459 | } |
480 | |||
481 | EXPORT_SYMBOL_GPL(vr41xx_gpio_pullupdown); | 460 | EXPORT_SYMBOL_GPL(vr41xx_gpio_pullupdown); |
482 | 461 | ||
483 | static ssize_t gpio_read(struct file *file, char __user *buf, size_t len, | 462 | static ssize_t gpio_read(struct file *file, char __user *buf, size_t len, |
@@ -596,61 +575,40 @@ static const struct file_operations gpio_fops = { | |||
596 | 575 | ||
597 | static int __devinit giu_probe(struct platform_device *dev) | 576 | static int __devinit giu_probe(struct platform_device *dev) |
598 | { | 577 | { |
599 | unsigned long start, size, flags = 0; | 578 | struct resource *res; |
600 | unsigned int nr_pins = 0, trigger, i, pin; | 579 | unsigned int trigger, i, pin; |
601 | struct resource *res1, *res2 = NULL; | ||
602 | void *base; | ||
603 | struct irq_chip *chip; | 580 | struct irq_chip *chip; |
604 | int retval; | 581 | int irq, retval; |
605 | 582 | ||
606 | switch (current_cpu_data.cputype) { | 583 | switch (dev->id) { |
607 | case CPU_VR4111: | 584 | case GPIO_50PINS_PULLUPDOWN: |
608 | case CPU_VR4121: | 585 | giu_flags = GPIO_HAS_PULLUPDOWN_IO; |
609 | start = GIU_TYPE1_START; | 586 | giu_nr_pins = 50; |
610 | size = GIU_TYPE1_SIZE; | ||
611 | flags = GPIO_HAS_PULLUPDOWN_IO; | ||
612 | nr_pins = 50; | ||
613 | break; | 587 | break; |
614 | case CPU_VR4122: | 588 | case GPIO_36PINS: |
615 | case CPU_VR4131: | 589 | giu_nr_pins = 36; |
616 | start = GIU_TYPE2_START; | ||
617 | size = GIU_TYPE2_SIZE; | ||
618 | nr_pins = 36; | ||
619 | break; | 590 | break; |
620 | case CPU_VR4133: | 591 | case GPIO_48PINS_EDGE_SELECT: |
621 | start = GIU_TYPE3_START; | 592 | giu_flags = GPIO_HAS_INTERRUPT_EDGE_SELECT; |
622 | size = GIU_TYPE3_SIZE; | 593 | giu_nr_pins = 48; |
623 | flags = GPIO_HAS_INTERRUPT_EDGE_SELECT; | ||
624 | nr_pins = 48; | ||
625 | break; | 594 | break; |
626 | default: | 595 | default: |
596 | printk(KERN_ERR "GIU: unknown ID %d\n", dev->id); | ||
627 | return -ENODEV; | 597 | return -ENODEV; |
628 | } | 598 | } |
629 | 599 | ||
630 | res1 = request_mem_region(start, size, "GIU"); | 600 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); |
631 | if (res1 == NULL) | 601 | if (!res) |
632 | return -EBUSY; | 602 | return -EBUSY; |
633 | 603 | ||
634 | base = ioremap(start, size); | 604 | giu_base = ioremap(res->start, res->end - res->start + 1); |
635 | if (base == NULL) { | 605 | if (!giu_base) |
636 | release_resource(res1); | ||
637 | return -ENOMEM; | 606 | return -ENOMEM; |
638 | } | ||
639 | |||
640 | if (flags & GPIO_HAS_PULLUPDOWN_IO) { | ||
641 | res2 = request_mem_region(GIU_PULLUPDOWN_START, GIU_PULLUPDOWN_SIZE, "GIU"); | ||
642 | if (res2 == NULL) { | ||
643 | iounmap(base); | ||
644 | release_resource(res1); | ||
645 | return -EBUSY; | ||
646 | } | ||
647 | } | ||
648 | 607 | ||
649 | retval = register_chrdev(major, "GIU", &gpio_fops); | 608 | retval = register_chrdev(major, "GIU", &gpio_fops); |
650 | if (retval < 0) { | 609 | if (retval < 0) { |
651 | iounmap(base); | 610 | iounmap(giu_base); |
652 | release_resource(res1); | 611 | giu_base = NULL; |
653 | release_resource(res2); | ||
654 | return retval; | 612 | return retval; |
655 | } | 613 | } |
656 | 614 | ||
@@ -660,11 +618,6 @@ static int __devinit giu_probe(struct platform_device *dev) | |||
660 | } | 618 | } |
661 | 619 | ||
662 | spin_lock_init(&giu_lock); | 620 | spin_lock_init(&giu_lock); |
663 | giu_base = base; | ||
664 | giu_resource1 = res1; | ||
665 | giu_resource2 = res2; | ||
666 | giu_flags = flags; | ||
667 | giu_nr_pins = nr_pins; | ||
668 | 621 | ||
669 | giu_write(GIUINTENL, 0); | 622 | giu_write(GIUINTENL, 0); |
670 | giu_write(GIUINTENH, 0); | 623 | giu_write(GIUINTENH, 0); |
@@ -685,22 +638,23 @@ static int __devinit giu_probe(struct platform_device *dev) | |||
685 | 638 | ||
686 | } | 639 | } |
687 | 640 | ||
688 | return cascade_irq(GIUINT_IRQ, giu_get_irq); | 641 | irq = platform_get_irq(dev, 0); |
642 | if (irq < 0 || irq >= NR_IRQS) | ||
643 | return -EBUSY; | ||
644 | |||
645 | return cascade_irq(irq, giu_get_irq); | ||
689 | } | 646 | } |
690 | 647 | ||
691 | static int __devexit giu_remove(struct platform_device *dev) | 648 | static int __devexit giu_remove(struct platform_device *dev) |
692 | { | 649 | { |
693 | iounmap(giu_base); | 650 | if (giu_base) { |
694 | 651 | iounmap(giu_base); | |
695 | release_resource(giu_resource1); | 652 | giu_base = NULL; |
696 | if (giu_flags & GPIO_HAS_PULLUPDOWN_IO) | 653 | } |
697 | release_resource(giu_resource2); | ||
698 | 654 | ||
699 | return 0; | 655 | return 0; |
700 | } | 656 | } |
701 | 657 | ||
702 | static struct platform_device *giu_platform_device; | ||
703 | |||
704 | static struct platform_driver giu_device_driver = { | 658 | static struct platform_driver giu_device_driver = { |
705 | .probe = giu_probe, | 659 | .probe = giu_probe, |
706 | .remove = __devexit_p(giu_remove), | 660 | .remove = __devexit_p(giu_remove), |
@@ -712,30 +666,12 @@ static struct platform_driver giu_device_driver = { | |||
712 | 666 | ||
713 | static int __init vr41xx_giu_init(void) | 667 | static int __init vr41xx_giu_init(void) |
714 | { | 668 | { |
715 | int retval; | 669 | return platform_driver_register(&giu_device_driver); |
716 | |||
717 | giu_platform_device = platform_device_alloc("GIU", -1); | ||
718 | if (!giu_platform_device) | ||
719 | return -ENOMEM; | ||
720 | |||
721 | retval = platform_device_add(giu_platform_device); | ||
722 | if (retval < 0) { | ||
723 | platform_device_put(giu_platform_device); | ||
724 | return retval; | ||
725 | } | ||
726 | |||
727 | retval = platform_driver_register(&giu_device_driver); | ||
728 | if (retval < 0) | ||
729 | platform_device_unregister(giu_platform_device); | ||
730 | |||
731 | return retval; | ||
732 | } | 670 | } |
733 | 671 | ||
734 | static void __exit vr41xx_giu_exit(void) | 672 | static void __exit vr41xx_giu_exit(void) |
735 | { | 673 | { |
736 | platform_driver_unregister(&giu_device_driver); | 674 | platform_driver_unregister(&giu_device_driver); |
737 | |||
738 | platform_device_unregister(giu_platform_device); | ||
739 | } | 675 | } |
740 | 676 | ||
741 | module_init(vr41xx_giu_init); | 677 | module_init(vr41xx_giu_init); |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index bbd9fc412877..6650ae1c088f 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -1956,7 +1956,7 @@ char con_buf[CON_BUF_SIZE]; | |||
1956 | DEFINE_MUTEX(con_buf_mtx); | 1956 | DEFINE_MUTEX(con_buf_mtx); |
1957 | 1957 | ||
1958 | /* is_double_width() is based on the wcwidth() implementation by | 1958 | /* is_double_width() is based on the wcwidth() implementation by |
1959 | * Markus Kuhn -- 2003-05-20 (Unicode 4.0) | 1959 | * Markus Kuhn -- 2007-05-26 (Unicode 5.0) |
1960 | * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c | 1960 | * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c |
1961 | */ | 1961 | */ |
1962 | struct interval { | 1962 | struct interval { |
@@ -1988,8 +1988,8 @@ static int is_double_width(uint32_t ucs) | |||
1988 | static const struct interval double_width[] = { | 1988 | static const struct interval double_width[] = { |
1989 | { 0x1100, 0x115F }, { 0x2329, 0x232A }, { 0x2E80, 0x303E }, | 1989 | { 0x1100, 0x115F }, { 0x2329, 0x232A }, { 0x2E80, 0x303E }, |
1990 | { 0x3040, 0xA4CF }, { 0xAC00, 0xD7A3 }, { 0xF900, 0xFAFF }, | 1990 | { 0x3040, 0xA4CF }, { 0xAC00, 0xD7A3 }, { 0xF900, 0xFAFF }, |
1991 | { 0xFE30, 0xFE6F }, { 0xFF00, 0xFF60 }, { 0xFFE0, 0xFFE6 }, | 1991 | { 0xFE10, 0xFE19 }, { 0xFE30, 0xFE6F }, { 0xFF00, 0xFF60 }, |
1992 | { 0x20000, 0x2FFFD }, { 0x30000, 0x3FFFD } | 1992 | { 0xFFE0, 0xFFE6 }, { 0x20000, 0x2FFFD }, { 0x30000, 0x3FFFD } |
1993 | }; | 1993 | }; |
1994 | return bisearch(ucs, double_width, | 1994 | return bisearch(ucs, double_width, |
1995 | sizeof(double_width) / sizeof(*double_width) - 1); | 1995 | sizeof(double_width) / sizeof(*double_width) - 1); |
@@ -2187,9 +2187,12 @@ rescan_last_byte: | |||
2187 | continue; /* nothing to display */ | 2187 | continue; /* nothing to display */ |
2188 | } | 2188 | } |
2189 | /* Glyph not found */ | 2189 | /* Glyph not found */ |
2190 | if (!(vc->vc_utf && !vc->vc_disp_ctrl) && !(c & ~charmask)) { | 2190 | if ((!(vc->vc_utf && !vc->vc_disp_ctrl) || c < 128) && !(c & ~charmask)) { |
2191 | /* In legacy mode use the glyph we get by a 1:1 mapping. | 2191 | /* In legacy mode use the glyph we get by a 1:1 mapping. |
2192 | This would make absolutely no sense with Unicode in mind. */ | 2192 | This would make absolutely no sense with Unicode in mind, |
2193 | but do this for ASCII characters since a font may lack | ||
2194 | Unicode mapping info and we don't want to end up with | ||
2195 | having question marks only. */ | ||
2193 | tc = c; | 2196 | tc = c; |
2194 | } else { | 2197 | } else { |
2195 | /* Display U+FFFD. If it's not found, display an inverse question mark. */ | 2198 | /* Display U+FFFD. If it's not found, display an inverse question mark. */ |
@@ -2213,6 +2216,7 @@ rescan_last_byte: | |||
2213 | } else { | 2216 | } else { |
2214 | vc_attr = ((vc->vc_attr) & 0x88) | (((vc->vc_attr) & 0x70) >> 4) | (((vc->vc_attr) & 0x07) << 4); | 2217 | vc_attr = ((vc->vc_attr) & 0x88) | (((vc->vc_attr) & 0x70) >> 4) | (((vc->vc_attr) & 0x07) << 4); |
2215 | } | 2218 | } |
2219 | FLUSH | ||
2216 | } | 2220 | } |
2217 | 2221 | ||
2218 | while (1) { | 2222 | while (1) { |
@@ -2246,6 +2250,10 @@ rescan_last_byte: | |||
2246 | if (tc < 0) tc = ' '; | 2250 | if (tc < 0) tc = ' '; |
2247 | } | 2251 | } |
2248 | 2252 | ||
2253 | if (inverse) { | ||
2254 | FLUSH | ||
2255 | } | ||
2256 | |||
2249 | if (rescan) { | 2257 | if (rescan) { |
2250 | rescan = 0; | 2258 | rescan = 0; |
2251 | inverse = 0; | 2259 | inverse = 0; |