diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/solos-pci.c | 1 | ||||
-rw-r--r-- | drivers/block/nbd.c | 9 | ||||
-rw-r--r-- | drivers/char/tpm/tpm_infineon.c | 4 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcmulti.c | 2 | ||||
-rw-r--r-- | drivers/net/3c509.c | 1 | ||||
-rw-r--r-- | drivers/net/gianfar.c | 6 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 2 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 13 | ||||
-rw-r--r-- | drivers/net/r8169.c | 93 | ||||
-rw-r--r-- | drivers/net/sungem.c | 8 | ||||
-rw-r--r-- | drivers/net/sunhme.c | 12 | ||||
-rw-r--r-- | drivers/net/tulip/de2104x.c | 3 | ||||
-rw-r--r-- | drivers/net/tun.c | 10 | ||||
-rw-r--r-- | drivers/parport/parport_serial.c | 5 | ||||
-rw-r--r-- | drivers/pci/intel-iommu.c | 14 | ||||
-rw-r--r-- | drivers/power/pcf50633-charger.c | 3 | ||||
-rw-r--r-- | drivers/rtc/rtc-au1xxx.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-pxa.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/dasd.c | 46 | ||||
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 2 | ||||
-rw-r--r-- | drivers/video/bfin-t350mcqb-fb.c | 2 | ||||
-rw-r--r-- | drivers/video/geode/gx1fb_core.c | 17 | ||||
-rw-r--r-- | drivers/video/geode/gxfb_core.c | 17 | ||||
-rw-r--r-- | drivers/video/geode/lxfb_core.c | 17 | ||||
-rw-r--r-- | drivers/w1/slaves/w1_therm.c | 2 |
25 files changed, 186 insertions, 107 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 72fc0f799a64..89d7a6e94c9c 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
@@ -685,6 +685,7 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
685 | out_release_regions: | 685 | out_release_regions: |
686 | pci_release_regions(dev); | 686 | pci_release_regions(dev); |
687 | out: | 687 | out: |
688 | kfree(card); | ||
688 | return err; | 689 | return err; |
689 | } | 690 | } |
690 | 691 | ||
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 34f80fa6fed1..8299e2d3b611 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -549,6 +549,15 @@ static void do_nbd_request(struct request_queue * q) | |||
549 | 549 | ||
550 | BUG_ON(lo->magic != LO_MAGIC); | 550 | BUG_ON(lo->magic != LO_MAGIC); |
551 | 551 | ||
552 | if (unlikely(!lo->sock)) { | ||
553 | printk(KERN_ERR "%s: Attempted send on closed socket\n", | ||
554 | lo->disk->disk_name); | ||
555 | req->errors++; | ||
556 | nbd_end_request(req); | ||
557 | spin_lock_irq(q->queue_lock); | ||
558 | continue; | ||
559 | } | ||
560 | |||
552 | spin_lock_irq(&lo->queue_lock); | 561 | spin_lock_irq(&lo->queue_lock); |
553 | list_add_tail(&req->queuelist, &lo->waiting_queue); | 562 | list_add_tail(&req->queuelist, &lo->waiting_queue); |
554 | spin_unlock_irq(&lo->queue_lock); | 563 | spin_unlock_irq(&lo->queue_lock); |
diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c index 726ee8a0277f..ecba4942fc8e 100644 --- a/drivers/char/tpm/tpm_infineon.c +++ b/drivers/char/tpm/tpm_infineon.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * SLD 9630 TT 1.1 and SLB 9635 TT 1.2 Trusted Platform Module | 4 | * SLD 9630 TT 1.1 and SLB 9635 TT 1.2 Trusted Platform Module |
5 | * Specifications at www.trustedcomputinggroup.org | 5 | * Specifications at www.trustedcomputinggroup.org |
6 | * | 6 | * |
7 | * Copyright (C) 2005, Marcel Selhorst <selhorst@crypto.rub.de> | 7 | * Copyright (C) 2005, Marcel Selhorst <m.selhorst@sirrix.com> |
8 | * Sirrix AG - security technologies, http://www.sirrix.com and | 8 | * Sirrix AG - security technologies, http://www.sirrix.com and |
9 | * Applied Data Security Group, Ruhr-University Bochum, Germany | 9 | * Applied Data Security Group, Ruhr-University Bochum, Germany |
10 | * Project-Homepage: http://www.prosec.rub.de/tpm | 10 | * Project-Homepage: http://www.prosec.rub.de/tpm |
@@ -636,7 +636,7 @@ static void __exit cleanup_inf(void) | |||
636 | module_init(init_inf); | 636 | module_init(init_inf); |
637 | module_exit(cleanup_inf); | 637 | module_exit(cleanup_inf); |
638 | 638 | ||
639 | MODULE_AUTHOR("Marcel Selhorst <selhorst@crypto.rub.de>"); | 639 | MODULE_AUTHOR("Marcel Selhorst <m.selhorst@sirrix.com>"); |
640 | MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2"); | 640 | MODULE_DESCRIPTION("Driver for Infineon TPM SLD 9630 TT 1.1 / SLB 9635 TT 1.2"); |
641 | MODULE_VERSION("1.9"); | 641 | MODULE_VERSION("1.9"); |
642 | MODULE_LICENSE("GPL"); | 642 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 595ba8eb4a07..0b28141e43bf 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -4599,6 +4599,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m) | |||
4599 | printk(KERN_ERR "%s: no memory for coeffs\n", | 4599 | printk(KERN_ERR "%s: no memory for coeffs\n", |
4600 | __func__); | 4600 | __func__); |
4601 | ret = -ENOMEM; | 4601 | ret = -ENOMEM; |
4602 | kfree(bch); | ||
4602 | goto free_chan; | 4603 | goto free_chan; |
4603 | } | 4604 | } |
4604 | bch->nr = ch; | 4605 | bch->nr = ch; |
@@ -4767,6 +4768,7 @@ init_multi_port(struct hfc_multi *hc, int pt) | |||
4767 | printk(KERN_ERR "%s: no memory for coeffs\n", | 4768 | printk(KERN_ERR "%s: no memory for coeffs\n", |
4768 | __func__); | 4769 | __func__); |
4769 | ret = -ENOMEM; | 4770 | ret = -ENOMEM; |
4771 | kfree(bch); | ||
4770 | goto free_chan; | 4772 | goto free_chan; |
4771 | } | 4773 | } |
4772 | bch->nr = ch + 1; | 4774 | bch->nr = ch + 1; |
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 535c234286ea..8c694213035b 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -1475,6 +1475,7 @@ el3_resume(struct device *pdev) | |||
1475 | spin_lock_irqsave(&lp->lock, flags); | 1475 | spin_lock_irqsave(&lp->lock, flags); |
1476 | 1476 | ||
1477 | outw(PowerUp, ioaddr + EL3_CMD); | 1477 | outw(PowerUp, ioaddr + EL3_CMD); |
1478 | EL3WINDOW(0); | ||
1478 | el3_up(dev); | 1479 | el3_up(dev); |
1479 | 1480 | ||
1480 | if (netif_running(dev)) | 1481 | if (netif_running(dev)) |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index acae2d8cd688..9b12a13a640f 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -1629,6 +1629,12 @@ static void gfar_schedule_cleanup(struct net_device *dev) | |||
1629 | if (netif_rx_schedule_prep(&priv->napi)) { | 1629 | if (netif_rx_schedule_prep(&priv->napi)) { |
1630 | gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED); | 1630 | gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED); |
1631 | __netif_rx_schedule(&priv->napi); | 1631 | __netif_rx_schedule(&priv->napi); |
1632 | } else { | ||
1633 | /* | ||
1634 | * Clear IEVENT, so interrupts aren't called again | ||
1635 | * because of the packets that have already arrived. | ||
1636 | */ | ||
1637 | gfar_write(&priv->regs->ievent, IEVENT_RTX_MASK); | ||
1632 | } | 1638 | } |
1633 | 1639 | ||
1634 | spin_unlock(&priv->rxlock); | 1640 | spin_unlock(&priv->rxlock); |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 9c78c963b721..f4dd9acb6877 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -1203,7 +1203,7 @@ typedef struct { | |||
1203 | #define NETXEN_IS_MSI_FAMILY(adapter) \ | 1203 | #define NETXEN_IS_MSI_FAMILY(adapter) \ |
1204 | ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) | 1204 | ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) |
1205 | 1205 | ||
1206 | #define MSIX_ENTRIES_PER_ADAPTER 8 | 1206 | #define MSIX_ENTRIES_PER_ADAPTER 1 |
1207 | #define NETXEN_MSIX_TBL_SPACE 8192 | 1207 | #define NETXEN_MSIX_TBL_SPACE 8192 |
1208 | #define NETXEN_PCI_REG_MSIX_TBL 0x44 | 1208 | #define NETXEN_PCI_REG_MSIX_TBL 0x44 |
1209 | 1209 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 645d384fe87e..3b17a7936147 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -76,6 +76,7 @@ static void netxen_nic_poll_controller(struct net_device *netdev); | |||
76 | #endif | 76 | #endif |
77 | static irqreturn_t netxen_intr(int irq, void *data); | 77 | static irqreturn_t netxen_intr(int irq, void *data); |
78 | static irqreturn_t netxen_msi_intr(int irq, void *data); | 78 | static irqreturn_t netxen_msi_intr(int irq, void *data); |
79 | static irqreturn_t netxen_msix_intr(int irq, void *data); | ||
79 | 80 | ||
80 | /* PCI Device ID Table */ | 81 | /* PCI Device ID Table */ |
81 | #define ENTRY(device) \ | 82 | #define ENTRY(device) \ |
@@ -1084,7 +1085,9 @@ static int netxen_nic_open(struct net_device *netdev) | |||
1084 | for (ring = 0; ring < adapter->max_rds_rings; ring++) | 1085 | for (ring = 0; ring < adapter->max_rds_rings; ring++) |
1085 | netxen_post_rx_buffers(adapter, ctx, ring); | 1086 | netxen_post_rx_buffers(adapter, ctx, ring); |
1086 | } | 1087 | } |
1087 | if (NETXEN_IS_MSI_FAMILY(adapter)) | 1088 | if (adapter->flags & NETXEN_NIC_MSIX_ENABLED) |
1089 | handler = netxen_msix_intr; | ||
1090 | else if (adapter->flags & NETXEN_NIC_MSI_ENABLED) | ||
1088 | handler = netxen_msi_intr; | 1091 | handler = netxen_msi_intr; |
1089 | else { | 1092 | else { |
1090 | flags |= IRQF_SHARED; | 1093 | flags |= IRQF_SHARED; |
@@ -1612,6 +1615,14 @@ static irqreturn_t netxen_msi_intr(int irq, void *data) | |||
1612 | return IRQ_HANDLED; | 1615 | return IRQ_HANDLED; |
1613 | } | 1616 | } |
1614 | 1617 | ||
1618 | static irqreturn_t netxen_msix_intr(int irq, void *data) | ||
1619 | { | ||
1620 | struct netxen_adapter *adapter = data; | ||
1621 | |||
1622 | napi_schedule(&adapter->napi); | ||
1623 | return IRQ_HANDLED; | ||
1624 | } | ||
1625 | |||
1615 | static int netxen_nic_poll(struct napi_struct *napi, int budget) | 1626 | static int netxen_nic_poll(struct napi_struct *napi, int budget) |
1616 | { | 1627 | { |
1617 | struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); | 1628 | struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 2c73ca606b35..0771eb6fc6eb 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -437,6 +437,22 @@ enum features { | |||
437 | RTL_FEATURE_GMII = (1 << 2), | 437 | RTL_FEATURE_GMII = (1 << 2), |
438 | }; | 438 | }; |
439 | 439 | ||
440 | struct rtl8169_counters { | ||
441 | __le64 tx_packets; | ||
442 | __le64 rx_packets; | ||
443 | __le64 tx_errors; | ||
444 | __le32 rx_errors; | ||
445 | __le16 rx_missed; | ||
446 | __le16 align_errors; | ||
447 | __le32 tx_one_collision; | ||
448 | __le32 tx_multi_collision; | ||
449 | __le64 rx_unicast; | ||
450 | __le64 rx_broadcast; | ||
451 | __le32 rx_multicast; | ||
452 | __le16 tx_aborted; | ||
453 | __le16 tx_underun; | ||
454 | }; | ||
455 | |||
440 | struct rtl8169_private { | 456 | struct rtl8169_private { |
441 | void __iomem *mmio_addr; /* memory map physical address */ | 457 | void __iomem *mmio_addr; /* memory map physical address */ |
442 | struct pci_dev *pci_dev; /* Index of PCI device */ | 458 | struct pci_dev *pci_dev; /* Index of PCI device */ |
@@ -480,6 +496,7 @@ struct rtl8169_private { | |||
480 | unsigned features; | 496 | unsigned features; |
481 | 497 | ||
482 | struct mii_if_info mii; | 498 | struct mii_if_info mii; |
499 | struct rtl8169_counters counters; | ||
483 | }; | 500 | }; |
484 | 501 | ||
485 | MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); | 502 | MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>"); |
@@ -1100,22 +1117,6 @@ static const char rtl8169_gstrings[][ETH_GSTRING_LEN] = { | |||
1100 | "tx_underrun", | 1117 | "tx_underrun", |
1101 | }; | 1118 | }; |
1102 | 1119 | ||
1103 | struct rtl8169_counters { | ||
1104 | __le64 tx_packets; | ||
1105 | __le64 rx_packets; | ||
1106 | __le64 tx_errors; | ||
1107 | __le32 rx_errors; | ||
1108 | __le16 rx_missed; | ||
1109 | __le16 align_errors; | ||
1110 | __le32 tx_one_collision; | ||
1111 | __le32 tx_multi_collision; | ||
1112 | __le64 rx_unicast; | ||
1113 | __le64 rx_broadcast; | ||
1114 | __le32 rx_multicast; | ||
1115 | __le16 tx_aborted; | ||
1116 | __le16 tx_underun; | ||
1117 | }; | ||
1118 | |||
1119 | static int rtl8169_get_sset_count(struct net_device *dev, int sset) | 1120 | static int rtl8169_get_sset_count(struct net_device *dev, int sset) |
1120 | { | 1121 | { |
1121 | switch (sset) { | 1122 | switch (sset) { |
@@ -1126,16 +1127,21 @@ static int rtl8169_get_sset_count(struct net_device *dev, int sset) | |||
1126 | } | 1127 | } |
1127 | } | 1128 | } |
1128 | 1129 | ||
1129 | static void rtl8169_get_ethtool_stats(struct net_device *dev, | 1130 | static void rtl8169_update_counters(struct net_device *dev) |
1130 | struct ethtool_stats *stats, u64 *data) | ||
1131 | { | 1131 | { |
1132 | struct rtl8169_private *tp = netdev_priv(dev); | 1132 | struct rtl8169_private *tp = netdev_priv(dev); |
1133 | void __iomem *ioaddr = tp->mmio_addr; | 1133 | void __iomem *ioaddr = tp->mmio_addr; |
1134 | struct rtl8169_counters *counters; | 1134 | struct rtl8169_counters *counters; |
1135 | dma_addr_t paddr; | 1135 | dma_addr_t paddr; |
1136 | u32 cmd; | 1136 | u32 cmd; |
1137 | int wait = 1000; | ||
1137 | 1138 | ||
1138 | ASSERT_RTNL(); | 1139 | /* |
1140 | * Some chips are unable to dump tally counters when the receiver | ||
1141 | * is disabled. | ||
1142 | */ | ||
1143 | if ((RTL_R8(ChipCmd) & CmdRxEnb) == 0) | ||
1144 | return; | ||
1139 | 1145 | ||
1140 | counters = pci_alloc_consistent(tp->pci_dev, sizeof(*counters), &paddr); | 1146 | counters = pci_alloc_consistent(tp->pci_dev, sizeof(*counters), &paddr); |
1141 | if (!counters) | 1147 | if (!counters) |
@@ -1146,31 +1152,45 @@ static void rtl8169_get_ethtool_stats(struct net_device *dev, | |||
1146 | RTL_W32(CounterAddrLow, cmd); | 1152 | RTL_W32(CounterAddrLow, cmd); |
1147 | RTL_W32(CounterAddrLow, cmd | CounterDump); | 1153 | RTL_W32(CounterAddrLow, cmd | CounterDump); |
1148 | 1154 | ||
1149 | while (RTL_R32(CounterAddrLow) & CounterDump) { | 1155 | while (wait--) { |
1150 | if (msleep_interruptible(1)) | 1156 | if ((RTL_R32(CounterAddrLow) & CounterDump) == 0) { |
1157 | /* copy updated counters */ | ||
1158 | memcpy(&tp->counters, counters, sizeof(*counters)); | ||
1151 | break; | 1159 | break; |
1160 | } | ||
1161 | udelay(10); | ||
1152 | } | 1162 | } |
1153 | 1163 | ||
1154 | RTL_W32(CounterAddrLow, 0); | 1164 | RTL_W32(CounterAddrLow, 0); |
1155 | RTL_W32(CounterAddrHigh, 0); | 1165 | RTL_W32(CounterAddrHigh, 0); |
1156 | 1166 | ||
1157 | data[0] = le64_to_cpu(counters->tx_packets); | ||
1158 | data[1] = le64_to_cpu(counters->rx_packets); | ||
1159 | data[2] = le64_to_cpu(counters->tx_errors); | ||
1160 | data[3] = le32_to_cpu(counters->rx_errors); | ||
1161 | data[4] = le16_to_cpu(counters->rx_missed); | ||
1162 | data[5] = le16_to_cpu(counters->align_errors); | ||
1163 | data[6] = le32_to_cpu(counters->tx_one_collision); | ||
1164 | data[7] = le32_to_cpu(counters->tx_multi_collision); | ||
1165 | data[8] = le64_to_cpu(counters->rx_unicast); | ||
1166 | data[9] = le64_to_cpu(counters->rx_broadcast); | ||
1167 | data[10] = le32_to_cpu(counters->rx_multicast); | ||
1168 | data[11] = le16_to_cpu(counters->tx_aborted); | ||
1169 | data[12] = le16_to_cpu(counters->tx_underun); | ||
1170 | |||
1171 | pci_free_consistent(tp->pci_dev, sizeof(*counters), counters, paddr); | 1167 | pci_free_consistent(tp->pci_dev, sizeof(*counters), counters, paddr); |
1172 | } | 1168 | } |
1173 | 1169 | ||
1170 | static void rtl8169_get_ethtool_stats(struct net_device *dev, | ||
1171 | struct ethtool_stats *stats, u64 *data) | ||
1172 | { | ||
1173 | struct rtl8169_private *tp = netdev_priv(dev); | ||
1174 | |||
1175 | ASSERT_RTNL(); | ||
1176 | |||
1177 | rtl8169_update_counters(dev); | ||
1178 | |||
1179 | data[0] = le64_to_cpu(tp->counters.tx_packets); | ||
1180 | data[1] = le64_to_cpu(tp->counters.rx_packets); | ||
1181 | data[2] = le64_to_cpu(tp->counters.tx_errors); | ||
1182 | data[3] = le32_to_cpu(tp->counters.rx_errors); | ||
1183 | data[4] = le16_to_cpu(tp->counters.rx_missed); | ||
1184 | data[5] = le16_to_cpu(tp->counters.align_errors); | ||
1185 | data[6] = le32_to_cpu(tp->counters.tx_one_collision); | ||
1186 | data[7] = le32_to_cpu(tp->counters.tx_multi_collision); | ||
1187 | data[8] = le64_to_cpu(tp->counters.rx_unicast); | ||
1188 | data[9] = le64_to_cpu(tp->counters.rx_broadcast); | ||
1189 | data[10] = le32_to_cpu(tp->counters.rx_multicast); | ||
1190 | data[11] = le16_to_cpu(tp->counters.tx_aborted); | ||
1191 | data[12] = le16_to_cpu(tp->counters.tx_underun); | ||
1192 | } | ||
1193 | |||
1174 | static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data) | 1194 | static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data) |
1175 | { | 1195 | { |
1176 | switch(stringset) { | 1196 | switch(stringset) { |
@@ -3682,6 +3702,9 @@ static int rtl8169_close(struct net_device *dev) | |||
3682 | struct rtl8169_private *tp = netdev_priv(dev); | 3702 | struct rtl8169_private *tp = netdev_priv(dev); |
3683 | struct pci_dev *pdev = tp->pci_dev; | 3703 | struct pci_dev *pdev = tp->pci_dev; |
3684 | 3704 | ||
3705 | /* update counters before going down */ | ||
3706 | rtl8169_update_counters(dev); | ||
3707 | |||
3685 | rtl8169_down(dev); | 3708 | rtl8169_down(dev); |
3686 | 3709 | ||
3687 | free_irq(dev->irq, dev); | 3710 | free_irq(dev->irq, dev); |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index b17efa9cc530..491876341068 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2221,6 +2221,8 @@ static int gem_do_start(struct net_device *dev) | |||
2221 | 2221 | ||
2222 | gp->running = 1; | 2222 | gp->running = 1; |
2223 | 2223 | ||
2224 | napi_enable(&gp->napi); | ||
2225 | |||
2224 | if (gp->lstate == link_up) { | 2226 | if (gp->lstate == link_up) { |
2225 | netif_carrier_on(gp->dev); | 2227 | netif_carrier_on(gp->dev); |
2226 | gem_set_link_modes(gp); | 2228 | gem_set_link_modes(gp); |
@@ -2238,6 +2240,8 @@ static int gem_do_start(struct net_device *dev) | |||
2238 | spin_lock_irqsave(&gp->lock, flags); | 2240 | spin_lock_irqsave(&gp->lock, flags); |
2239 | spin_lock(&gp->tx_lock); | 2241 | spin_lock(&gp->tx_lock); |
2240 | 2242 | ||
2243 | napi_disable(&gp->napi); | ||
2244 | |||
2241 | gp->running = 0; | 2245 | gp->running = 0; |
2242 | gem_reset(gp); | 2246 | gem_reset(gp); |
2243 | gem_clean_rings(gp); | 2247 | gem_clean_rings(gp); |
@@ -2338,8 +2342,6 @@ static int gem_open(struct net_device *dev) | |||
2338 | if (!gp->asleep) | 2342 | if (!gp->asleep) |
2339 | rc = gem_do_start(dev); | 2343 | rc = gem_do_start(dev); |
2340 | gp->opened = (rc == 0); | 2344 | gp->opened = (rc == 0); |
2341 | if (gp->opened) | ||
2342 | napi_enable(&gp->napi); | ||
2343 | 2345 | ||
2344 | mutex_unlock(&gp->pm_mutex); | 2346 | mutex_unlock(&gp->pm_mutex); |
2345 | 2347 | ||
@@ -2476,8 +2478,6 @@ static int gem_resume(struct pci_dev *pdev) | |||
2476 | 2478 | ||
2477 | /* Re-attach net device */ | 2479 | /* Re-attach net device */ |
2478 | netif_device_attach(dev); | 2480 | netif_device_attach(dev); |
2479 | |||
2480 | napi_enable(&gp->napi); | ||
2481 | } | 2481 | } |
2482 | 2482 | ||
2483 | spin_lock_irqsave(&gp->lock, flags); | 2483 | spin_lock_irqsave(&gp->lock, flags); |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 7a72a3112f0a..cc4013be5e18 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2629,6 +2629,14 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
2629 | int i, qfe_slot = -1; | 2629 | int i, qfe_slot = -1; |
2630 | int err = -ENODEV; | 2630 | int err = -ENODEV; |
2631 | 2631 | ||
2632 | sbus_dp = to_of_device(op->dev.parent)->node; | ||
2633 | if (is_qfe) | ||
2634 | sbus_dp = to_of_device(op->dev.parent->parent)->node; | ||
2635 | |||
2636 | /* We can match PCI devices too, do not accept those here. */ | ||
2637 | if (strcmp(sbus_dp->name, "sbus")) | ||
2638 | return err; | ||
2639 | |||
2632 | if (is_qfe) { | 2640 | if (is_qfe) { |
2633 | qp = quattro_sbus_find(op); | 2641 | qp = quattro_sbus_find(op); |
2634 | if (qp == NULL) | 2642 | if (qp == NULL) |
@@ -2734,10 +2742,6 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
2734 | if (qp != NULL) | 2742 | if (qp != NULL) |
2735 | hp->happy_flags |= HFLAG_QUATTRO; | 2743 | hp->happy_flags |= HFLAG_QUATTRO; |
2736 | 2744 | ||
2737 | sbus_dp = to_of_device(op->dev.parent)->node; | ||
2738 | if (is_qfe) | ||
2739 | sbus_dp = to_of_device(op->dev.parent->parent)->node; | ||
2740 | |||
2741 | /* Get the supported DVMA burst sizes from our Happy SBUS. */ | 2745 | /* Get the supported DVMA burst sizes from our Happy SBUS. */ |
2742 | hp->happy_bursts = of_getintprop_default(sbus_dp, | 2746 | hp->happy_bursts = of_getintprop_default(sbus_dp, |
2743 | "burst-sizes", 0x00); | 2747 | "burst-sizes", 0x00); |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 0bf2114738be..d4c5ecc51f77 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -464,13 +464,14 @@ static void de_rx (struct de_private *de) | |||
464 | drop = 1; | 464 | drop = 1; |
465 | 465 | ||
466 | rx_next: | 466 | rx_next: |
467 | de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); | ||
468 | if (rx_tail == (DE_RX_RING_SIZE - 1)) | 467 | if (rx_tail == (DE_RX_RING_SIZE - 1)) |
469 | de->rx_ring[rx_tail].opts2 = | 468 | de->rx_ring[rx_tail].opts2 = |
470 | cpu_to_le32(RingEnd | de->rx_buf_sz); | 469 | cpu_to_le32(RingEnd | de->rx_buf_sz); |
471 | else | 470 | else |
472 | de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); | 471 | de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); |
473 | de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); | 472 | de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); |
473 | wmb(); | ||
474 | de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); | ||
474 | rx_tail = NEXT_RX(rx_tail); | 475 | rx_tail = NEXT_RX(rx_tail); |
475 | } | 476 | } |
476 | 477 | ||
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d7b81e4fdd56..09fea31d3e36 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -157,10 +157,16 @@ static int update_filter(struct tap_filter *filter, void __user *arg) | |||
157 | 157 | ||
158 | nexact = n; | 158 | nexact = n; |
159 | 159 | ||
160 | /* The rest is hashed */ | 160 | /* Remaining multicast addresses are hashed, |
161 | * unicast will leave the filter disabled. */ | ||
161 | memset(filter->mask, 0, sizeof(filter->mask)); | 162 | memset(filter->mask, 0, sizeof(filter->mask)); |
162 | for (; n < uf.count; n++) | 163 | for (; n < uf.count; n++) { |
164 | if (!is_multicast_ether_addr(addr[n].u)) { | ||
165 | err = 0; /* no filter */ | ||
166 | goto done; | ||
167 | } | ||
163 | addr_hash_set(filter->mask, addr[n].u); | 168 | addr_hash_set(filter->mask, addr[n].u); |
169 | } | ||
164 | 170 | ||
165 | /* For ALLMULTI just set the mask to all ones. | 171 | /* For ALLMULTI just set the mask to all ones. |
166 | * This overrides the mask populated above. */ | 172 | * This overrides the mask populated above. */ |
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index 101ed49a2d15..032db815b0f9 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c | |||
@@ -64,6 +64,11 @@ struct parport_pc_pci { | |||
64 | 64 | ||
65 | static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *card, int autoirq, int autodma) | 65 | static int __devinit netmos_parallel_init(struct pci_dev *dev, struct parport_pc_pci *card, int autoirq, int autodma) |
66 | { | 66 | { |
67 | /* the rule described below doesn't hold for this device */ | ||
68 | if (dev->device == PCI_DEVICE_ID_NETMOS_9835 && | ||
69 | dev->subsystem_vendor == PCI_VENDOR_ID_IBM && | ||
70 | dev->subsystem_device == 0x0299) | ||
71 | return -ENODEV; | ||
67 | /* | 72 | /* |
68 | * Netmos uses the subdevice ID to indicate the number of parallel | 73 | * Netmos uses the subdevice ID to indicate the number of parallel |
69 | * and serial ports. The form is 0x00PS, where <P> is the number of | 74 | * and serial ports. The form is 0x00PS, where <P> is the number of |
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 3dfecb20d5e7..f4b7c79023ff 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -268,7 +268,12 @@ static long list_size; | |||
268 | 268 | ||
269 | static void domain_remove_dev_info(struct dmar_domain *domain); | 269 | static void domain_remove_dev_info(struct dmar_domain *domain); |
270 | 270 | ||
271 | int dmar_disabled; | 271 | #ifdef CONFIG_DMAR_DEFAULT_ON |
272 | int dmar_disabled = 0; | ||
273 | #else | ||
274 | int dmar_disabled = 1; | ||
275 | #endif /*CONFIG_DMAR_DEFAULT_ON*/ | ||
276 | |||
272 | static int __initdata dmar_map_gfx = 1; | 277 | static int __initdata dmar_map_gfx = 1; |
273 | static int dmar_forcedac; | 278 | static int dmar_forcedac; |
274 | static int intel_iommu_strict; | 279 | static int intel_iommu_strict; |
@@ -284,9 +289,12 @@ static int __init intel_iommu_setup(char *str) | |||
284 | if (!str) | 289 | if (!str) |
285 | return -EINVAL; | 290 | return -EINVAL; |
286 | while (*str) { | 291 | while (*str) { |
287 | if (!strncmp(str, "off", 3)) { | 292 | if (!strncmp(str, "on", 2)) { |
293 | dmar_disabled = 0; | ||
294 | printk(KERN_INFO "Intel-IOMMU: enabled\n"); | ||
295 | } else if (!strncmp(str, "off", 3)) { | ||
288 | dmar_disabled = 1; | 296 | dmar_disabled = 1; |
289 | printk(KERN_INFO"Intel-IOMMU: disabled\n"); | 297 | printk(KERN_INFO "Intel-IOMMU: disabled\n"); |
290 | } else if (!strncmp(str, "igfx_off", 8)) { | 298 | } else if (!strncmp(str, "igfx_off", 8)) { |
291 | dmar_map_gfx = 0; | 299 | dmar_map_gfx = 0; |
292 | printk(KERN_INFO | 300 | printk(KERN_INFO |
diff --git a/drivers/power/pcf50633-charger.c b/drivers/power/pcf50633-charger.c index e988ec130fcd..41aec2acbb91 100644 --- a/drivers/power/pcf50633-charger.c +++ b/drivers/power/pcf50633-charger.c | |||
@@ -199,7 +199,8 @@ static int adapter_get_property(struct power_supply *psy, | |||
199 | enum power_supply_property psp, | 199 | enum power_supply_property psp, |
200 | union power_supply_propval *val) | 200 | union power_supply_propval *val) |
201 | { | 201 | { |
202 | struct pcf50633_mbc *mbc = container_of(psy, struct pcf50633_mbc, usb); | 202 | struct pcf50633_mbc *mbc = container_of(psy, |
203 | struct pcf50633_mbc, adapter); | ||
203 | int ret = 0; | 204 | int ret = 0; |
204 | 205 | ||
205 | switch (psp) { | 206 | switch (psp) { |
diff --git a/drivers/rtc/rtc-au1xxx.c b/drivers/rtc/rtc-au1xxx.c index 8906a688e6a6..979ed0406ce9 100644 --- a/drivers/rtc/rtc-au1xxx.c +++ b/drivers/rtc/rtc-au1xxx.c | |||
@@ -81,7 +81,7 @@ static int __devinit au1xtoy_rtc_probe(struct platform_device *pdev) | |||
81 | if (au_readl(SYS_TOYTRIM) != 32767) { | 81 | if (au_readl(SYS_TOYTRIM) != 32767) { |
82 | /* wait until hardware gives access to TRIM register */ | 82 | /* wait until hardware gives access to TRIM register */ |
83 | t = 0x00100000; | 83 | t = 0x00100000; |
84 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && t--) | 84 | while ((au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T0S) && --t) |
85 | msleep(1); | 85 | msleep(1); |
86 | 86 | ||
87 | if (!t) { | 87 | if (!t) { |
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index bd56a033bfd0..bb8cc05605ac 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c | |||
@@ -485,7 +485,7 @@ static void __exit pxa_rtc_exit(void) | |||
485 | module_init(pxa_rtc_init); | 485 | module_init(pxa_rtc_init); |
486 | module_exit(pxa_rtc_exit); | 486 | module_exit(pxa_rtc_exit); |
487 | 487 | ||
488 | MODULE_AUTHOR("Robert Jarzmik"); | 488 | MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>"); |
489 | MODULE_DESCRIPTION("PXA27x/PXA3xx Realtime Clock Driver (RTC)"); | 489 | MODULE_DESCRIPTION("PXA27x/PXA3xx Realtime Clock Driver (RTC)"); |
490 | MODULE_LICENSE("GPL"); | 490 | MODULE_LICENSE("GPL"); |
491 | MODULE_ALIAS("platform:pxa-rtc"); | 491 | MODULE_ALIAS("platform:pxa-rtc"); |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index bd5914994142..08c23a921012 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -57,6 +57,8 @@ static void dasd_device_tasklet(struct dasd_device *); | |||
57 | static void dasd_block_tasklet(struct dasd_block *); | 57 | static void dasd_block_tasklet(struct dasd_block *); |
58 | static void do_kick_device(struct work_struct *); | 58 | static void do_kick_device(struct work_struct *); |
59 | static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *); | 59 | static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *); |
60 | static void dasd_device_timeout(unsigned long); | ||
61 | static void dasd_block_timeout(unsigned long); | ||
60 | 62 | ||
61 | /* | 63 | /* |
62 | * SECTION: Operations on the device structure. | 64 | * SECTION: Operations on the device structure. |
@@ -99,6 +101,8 @@ struct dasd_device *dasd_alloc_device(void) | |||
99 | (unsigned long) device); | 101 | (unsigned long) device); |
100 | INIT_LIST_HEAD(&device->ccw_queue); | 102 | INIT_LIST_HEAD(&device->ccw_queue); |
101 | init_timer(&device->timer); | 103 | init_timer(&device->timer); |
104 | device->timer.function = dasd_device_timeout; | ||
105 | device->timer.data = (unsigned long) device; | ||
102 | INIT_WORK(&device->kick_work, do_kick_device); | 106 | INIT_WORK(&device->kick_work, do_kick_device); |
103 | device->state = DASD_STATE_NEW; | 107 | device->state = DASD_STATE_NEW; |
104 | device->target = DASD_STATE_NEW; | 108 | device->target = DASD_STATE_NEW; |
@@ -138,6 +142,8 @@ struct dasd_block *dasd_alloc_block(void) | |||
138 | INIT_LIST_HEAD(&block->ccw_queue); | 142 | INIT_LIST_HEAD(&block->ccw_queue); |
139 | spin_lock_init(&block->queue_lock); | 143 | spin_lock_init(&block->queue_lock); |
140 | init_timer(&block->timer); | 144 | init_timer(&block->timer); |
145 | block->timer.function = dasd_block_timeout; | ||
146 | block->timer.data = (unsigned long) block; | ||
141 | 147 | ||
142 | return block; | 148 | return block; |
143 | } | 149 | } |
@@ -915,19 +921,10 @@ static void dasd_device_timeout(unsigned long ptr) | |||
915 | */ | 921 | */ |
916 | void dasd_device_set_timer(struct dasd_device *device, int expires) | 922 | void dasd_device_set_timer(struct dasd_device *device, int expires) |
917 | { | 923 | { |
918 | if (expires == 0) { | 924 | if (expires == 0) |
919 | if (timer_pending(&device->timer)) | 925 | del_timer(&device->timer); |
920 | del_timer(&device->timer); | 926 | else |
921 | return; | 927 | mod_timer(&device->timer, jiffies + expires); |
922 | } | ||
923 | if (timer_pending(&device->timer)) { | ||
924 | if (mod_timer(&device->timer, jiffies + expires)) | ||
925 | return; | ||
926 | } | ||
927 | device->timer.function = dasd_device_timeout; | ||
928 | device->timer.data = (unsigned long) device; | ||
929 | device->timer.expires = jiffies + expires; | ||
930 | add_timer(&device->timer); | ||
931 | } | 928 | } |
932 | 929 | ||
933 | /* | 930 | /* |
@@ -935,8 +932,7 @@ void dasd_device_set_timer(struct dasd_device *device, int expires) | |||
935 | */ | 932 | */ |
936 | void dasd_device_clear_timer(struct dasd_device *device) | 933 | void dasd_device_clear_timer(struct dasd_device *device) |
937 | { | 934 | { |
938 | if (timer_pending(&device->timer)) | 935 | del_timer(&device->timer); |
939 | del_timer(&device->timer); | ||
940 | } | 936 | } |
941 | 937 | ||
942 | static void dasd_handle_killed_request(struct ccw_device *cdev, | 938 | static void dasd_handle_killed_request(struct ccw_device *cdev, |
@@ -1586,19 +1582,10 @@ static void dasd_block_timeout(unsigned long ptr) | |||
1586 | */ | 1582 | */ |
1587 | void dasd_block_set_timer(struct dasd_block *block, int expires) | 1583 | void dasd_block_set_timer(struct dasd_block *block, int expires) |
1588 | { | 1584 | { |
1589 | if (expires == 0) { | 1585 | if (expires == 0) |
1590 | if (timer_pending(&block->timer)) | 1586 | del_timer(&block->timer); |
1591 | del_timer(&block->timer); | 1587 | else |
1592 | return; | 1588 | mod_timer(&block->timer, jiffies + expires); |
1593 | } | ||
1594 | if (timer_pending(&block->timer)) { | ||
1595 | if (mod_timer(&block->timer, jiffies + expires)) | ||
1596 | return; | ||
1597 | } | ||
1598 | block->timer.function = dasd_block_timeout; | ||
1599 | block->timer.data = (unsigned long) block; | ||
1600 | block->timer.expires = jiffies + expires; | ||
1601 | add_timer(&block->timer); | ||
1602 | } | 1589 | } |
1603 | 1590 | ||
1604 | /* | 1591 | /* |
@@ -1606,8 +1593,7 @@ void dasd_block_set_timer(struct dasd_block *block, int expires) | |||
1606 | */ | 1593 | */ |
1607 | void dasd_block_clear_timer(struct dasd_block *block) | 1594 | void dasd_block_clear_timer(struct dasd_block *block) |
1608 | { | 1595 | { |
1609 | if (timer_pending(&block->timer)) | 1596 | del_timer(&block->timer); |
1610 | del_timer(&block->timer); | ||
1611 | } | 1597 | } |
1612 | 1598 | ||
1613 | /* | 1599 | /* |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 300e28a531f8..34339902efb9 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -677,7 +677,7 @@ static ssize_t dasd_ff_show(struct device *dev, struct device_attribute *attr, | |||
677 | struct dasd_devmap *devmap; | 677 | struct dasd_devmap *devmap; |
678 | int ff_flag; | 678 | int ff_flag; |
679 | 679 | ||
680 | devmap = dasd_find_busid(dev->bus_id); | 680 | devmap = dasd_find_busid(dev_name(dev)); |
681 | if (!IS_ERR(devmap)) | 681 | if (!IS_ERR(devmap)) |
682 | ff_flag = (devmap->features & DASD_FEATURE_FAILFAST) != 0; | 682 | ff_flag = (devmap->features & DASD_FEATURE_FAILFAST) != 0; |
683 | else | 683 | else |
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c index 2a423d3a2a8e..90cfddabf1f7 100644 --- a/drivers/video/bfin-t350mcqb-fb.c +++ b/drivers/video/bfin-t350mcqb-fb.c | |||
@@ -447,7 +447,7 @@ static irqreturn_t bfin_t350mcqb_irq_error(int irq, void *dev_id) | |||
447 | return IRQ_HANDLED; | 447 | return IRQ_HANDLED; |
448 | } | 448 | } |
449 | 449 | ||
450 | static int __init bfin_t350mcqb_probe(struct platform_device *pdev) | 450 | static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev) |
451 | { | 451 | { |
452 | struct bfin_t350mcqbfb_info *info; | 452 | struct bfin_t350mcqbfb_info *info; |
453 | struct fb_info *fbinfo; | 453 | struct fb_info *fbinfo; |
diff --git a/drivers/video/geode/gx1fb_core.c b/drivers/video/geode/gx1fb_core.c index 751e491ca8c8..f20eff8c4a81 100644 --- a/drivers/video/geode/gx1fb_core.c +++ b/drivers/video/geode/gx1fb_core.c | |||
@@ -136,13 +136,10 @@ static int gx1fb_set_par(struct fb_info *info) | |||
136 | { | 136 | { |
137 | struct geodefb_par *par = info->par; | 137 | struct geodefb_par *par = info->par; |
138 | 138 | ||
139 | if (info->var.bits_per_pixel == 16) { | 139 | if (info->var.bits_per_pixel == 16) |
140 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 140 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
141 | fb_dealloc_cmap(&info->cmap); | 141 | else |
142 | } else { | ||
143 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; | 142 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; |
144 | fb_alloc_cmap(&info->cmap, 1<<info->var.bits_per_pixel, 0); | ||
145 | } | ||
146 | 143 | ||
147 | info->fix.line_length = gx1_line_delta(info->var.xres, info->var.bits_per_pixel); | 144 | info->fix.line_length = gx1_line_delta(info->var.xres, info->var.bits_per_pixel); |
148 | 145 | ||
@@ -315,6 +312,10 @@ static struct fb_info * __init gx1fb_init_fbinfo(struct device *dev) | |||
315 | if (!par->panel_x) | 312 | if (!par->panel_x) |
316 | par->enable_crt = 1; /* fall back to CRT if no panel is specified */ | 313 | par->enable_crt = 1; /* fall back to CRT if no panel is specified */ |
317 | 314 | ||
315 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { | ||
316 | framebuffer_release(info); | ||
317 | return NULL; | ||
318 | } | ||
318 | return info; | 319 | return info; |
319 | } | 320 | } |
320 | 321 | ||
@@ -374,8 +375,11 @@ static int __init gx1fb_probe(struct pci_dev *pdev, const struct pci_device_id * | |||
374 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); | 375 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); |
375 | } | 376 | } |
376 | 377 | ||
377 | if (info) | 378 | if (info) { |
379 | fb_dealloc_cmap(&info->cmap); | ||
378 | framebuffer_release(info); | 380 | framebuffer_release(info); |
381 | } | ||
382 | |||
379 | return ret; | 383 | return ret; |
380 | } | 384 | } |
381 | 385 | ||
@@ -395,6 +399,7 @@ static void gx1fb_remove(struct pci_dev *pdev) | |||
395 | iounmap(par->dc_regs); | 399 | iounmap(par->dc_regs); |
396 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); | 400 | release_mem_region(gx1_gx_base() + 0x8300, 0x100); |
397 | 401 | ||
402 | fb_dealloc_cmap(&info->cmap); | ||
398 | pci_set_drvdata(pdev, NULL); | 403 | pci_set_drvdata(pdev, NULL); |
399 | 404 | ||
400 | framebuffer_release(info); | 405 | framebuffer_release(info); |
diff --git a/drivers/video/geode/gxfb_core.c b/drivers/video/geode/gxfb_core.c index 484118926318..2552cac39e1c 100644 --- a/drivers/video/geode/gxfb_core.c +++ b/drivers/video/geode/gxfb_core.c | |||
@@ -171,13 +171,10 @@ static int gxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
171 | 171 | ||
172 | static int gxfb_set_par(struct fb_info *info) | 172 | static int gxfb_set_par(struct fb_info *info) |
173 | { | 173 | { |
174 | if (info->var.bits_per_pixel > 8) { | 174 | if (info->var.bits_per_pixel > 8) |
175 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 175 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
176 | fb_dealloc_cmap(&info->cmap); | 176 | else |
177 | } else { | ||
178 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; | 177 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; |
179 | fb_alloc_cmap(&info->cmap, 1<<info->var.bits_per_pixel, 0); | ||
180 | } | ||
181 | 178 | ||
182 | info->fix.line_length = gx_line_delta(info->var.xres, info->var.bits_per_pixel); | 179 | info->fix.line_length = gx_line_delta(info->var.xres, info->var.bits_per_pixel); |
183 | 180 | ||
@@ -331,6 +328,11 @@ static struct fb_info * __init gxfb_init_fbinfo(struct device *dev) | |||
331 | 328 | ||
332 | info->var.grayscale = 0; | 329 | info->var.grayscale = 0; |
333 | 330 | ||
331 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { | ||
332 | framebuffer_release(info); | ||
333 | return NULL; | ||
334 | } | ||
335 | |||
334 | return info; | 336 | return info; |
335 | } | 337 | } |
336 | 338 | ||
@@ -443,8 +445,10 @@ static int __init gxfb_probe(struct pci_dev *pdev, const struct pci_device_id *i | |||
443 | pci_release_region(pdev, 1); | 445 | pci_release_region(pdev, 1); |
444 | } | 446 | } |
445 | 447 | ||
446 | if (info) | 448 | if (info) { |
449 | fb_dealloc_cmap(&info->cmap); | ||
447 | framebuffer_release(info); | 450 | framebuffer_release(info); |
451 | } | ||
448 | return ret; | 452 | return ret; |
449 | } | 453 | } |
450 | 454 | ||
@@ -467,6 +471,7 @@ static void gxfb_remove(struct pci_dev *pdev) | |||
467 | iounmap(par->gp_regs); | 471 | iounmap(par->gp_regs); |
468 | pci_release_region(pdev, 1); | 472 | pci_release_region(pdev, 1); |
469 | 473 | ||
474 | fb_dealloc_cmap(&info->cmap); | ||
470 | pci_set_drvdata(pdev, NULL); | 475 | pci_set_drvdata(pdev, NULL); |
471 | 476 | ||
472 | framebuffer_release(info); | 477 | framebuffer_release(info); |
diff --git a/drivers/video/geode/lxfb_core.c b/drivers/video/geode/lxfb_core.c index b965ecdbc604..889cbe39e580 100644 --- a/drivers/video/geode/lxfb_core.c +++ b/drivers/video/geode/lxfb_core.c | |||
@@ -278,13 +278,10 @@ static int lxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
278 | 278 | ||
279 | static int lxfb_set_par(struct fb_info *info) | 279 | static int lxfb_set_par(struct fb_info *info) |
280 | { | 280 | { |
281 | if (info->var.bits_per_pixel > 8) { | 281 | if (info->var.bits_per_pixel > 8) |
282 | info->fix.visual = FB_VISUAL_TRUECOLOR; | 282 | info->fix.visual = FB_VISUAL_TRUECOLOR; |
283 | fb_dealloc_cmap(&info->cmap); | 283 | else |
284 | } else { | ||
285 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; | 284 | info->fix.visual = FB_VISUAL_PSEUDOCOLOR; |
286 | fb_alloc_cmap(&info->cmap, 1<<info->var.bits_per_pixel, 0); | ||
287 | } | ||
288 | 285 | ||
289 | info->fix.line_length = lx_get_pitch(info->var.xres, | 286 | info->fix.line_length = lx_get_pitch(info->var.xres, |
290 | info->var.bits_per_pixel); | 287 | info->var.bits_per_pixel); |
@@ -451,6 +448,11 @@ static struct fb_info * __init lxfb_init_fbinfo(struct device *dev) | |||
451 | 448 | ||
452 | info->pseudo_palette = (void *)par + sizeof(struct lxfb_par); | 449 | info->pseudo_palette = (void *)par + sizeof(struct lxfb_par); |
453 | 450 | ||
451 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { | ||
452 | framebuffer_release(info); | ||
453 | return NULL; | ||
454 | } | ||
455 | |||
454 | info->var.grayscale = 0; | 456 | info->var.grayscale = 0; |
455 | 457 | ||
456 | return info; | 458 | return info; |
@@ -579,8 +581,10 @@ err: | |||
579 | pci_release_region(pdev, 3); | 581 | pci_release_region(pdev, 3); |
580 | } | 582 | } |
581 | 583 | ||
582 | if (info) | 584 | if (info) { |
585 | fb_dealloc_cmap(&info->cmap); | ||
583 | framebuffer_release(info); | 586 | framebuffer_release(info); |
587 | } | ||
584 | 588 | ||
585 | return ret; | 589 | return ret; |
586 | } | 590 | } |
@@ -604,6 +608,7 @@ static void lxfb_remove(struct pci_dev *pdev) | |||
604 | iounmap(par->vp_regs); | 608 | iounmap(par->vp_regs); |
605 | pci_release_region(pdev, 3); | 609 | pci_release_region(pdev, 3); |
606 | 610 | ||
611 | fb_dealloc_cmap(&info->cmap); | ||
607 | pci_set_drvdata(pdev, NULL); | 612 | pci_set_drvdata(pdev, NULL); |
608 | framebuffer_release(info); | 613 | framebuffer_release(info); |
609 | } | 614 | } |
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c index 2c8dff9f77da..1ed3d554e372 100644 --- a/drivers/w1/slaves/w1_therm.c +++ b/drivers/w1/slaves/w1_therm.c | |||
@@ -115,7 +115,7 @@ static struct w1_therm_family_converter w1_therm_families[] = { | |||
115 | 115 | ||
116 | static inline int w1_DS18B20_convert_temp(u8 rom[9]) | 116 | static inline int w1_DS18B20_convert_temp(u8 rom[9]) |
117 | { | 117 | { |
118 | s16 t = (rom[1] << 8) | rom[0]; | 118 | int t = ((s16)rom[1] << 8) | rom[0]; |
119 | t = t*1000/16; | 119 | t = t*1000/16; |
120 | return t; | 120 | return t; |
121 | } | 121 | } |