aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/synclink_gt.c2
-rw-r--r--drivers/char/tty_io.c2
-rw-r--r--drivers/ieee1394/video1394.c2
-rw-r--r--drivers/mtd/redboot.c28
-rw-r--r--drivers/pnp/card.c12
-rw-r--r--drivers/sn/Kconfig4
-rw-r--r--drivers/sn/ioc3.c11
7 files changed, 40 insertions, 21 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index a85a60a93deb27..b046390cd256cd 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -306,7 +306,7 @@ struct slgt_info {
int tx_active;
unsigned char signals; /* serial signal states */
- unsigned int init_error; /* initialization error */
+ int init_error; /* initialization error */
unsigned char *tx_buf;
int tx_count;
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index e9bba94fc89838..53d3d066554e55 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -303,7 +303,7 @@ static struct tty_buffer *tty_buffer_find(struct tty_struct *tty, size_t size)
t->commit = 0;
t->read = 0;
/* DEBUG ONLY */
- memset(t->data, '*', size);
+/* memset(t->data, '*', size); */
/* printk("Flip recycle %p\n", t); */
return t;
}
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
index 39fb88309e8e80..216dbbf1dc8ec8 100644
--- a/drivers/ieee1394/video1394.c
+++ b/drivers/ieee1394/video1394.c
@@ -744,7 +744,7 @@ static int __video1394_ioctl(struct file *file,
if (i == ISO_CHANNELS) {
PRINT(KERN_ERR, ohci->host->id,
"No free channel found");
- return EAGAIN;
+ return -EAGAIN;
}
if (!(ohci->ISO_channel_usage & mask)) {
v.channel = i;
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
index 7b7ca5ab5ae41c..d01b6a9198e0ac 100644
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -89,8 +89,34 @@ static int parse_redboot_partitions(struct mtd_info *master,
i = numslots;
break;
}
- if (!memcmp(buf[i].name, "FIS directory", 14))
+ if (!memcmp(buf[i].name, "FIS directory", 14)) {
+ /* This is apparently the FIS directory entry for the
+ * FIS directory itself. The FIS directory size is
+ * one erase block, if the buf[i].size field is
+ * swab32(erasesize) then we know we are looking at
+ * a byte swapped FIS directory - swap all the entries!
+ * (NOTE: this is 'size' not 'data_length', size is
+ * the full size of the entry.)
+ */
+ if (swab32(buf[i].size) == master->erasesize) {
+ int j;
+ for (j = 0; j < numslots && buf[j].name[0] != 0xff; ++j) {
+ /* The unsigned long fields were written with the
+ * wrong byte sex, name and pad have no byte sex.
+ */
+# define do_swab32(x) (x) = swab32(x)
+ do_swab32(buf[j].flash_base);
+ do_swab32(buf[j].mem_base);
+ do_swab32(buf[j].size);
+ do_swab32(buf[j].entry_point);
+ do_swab32(buf[j].data_length);
+ do_swab32(buf[j].desc_cksum);
+ do_swab32(buf[j].file_cksum);
+# undef do_swab32
+ }
+ }
break;
+ }
}
if (i == numslots) {
/* Didn't find it */
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index aaa568a3806ea9..b68eef251614c6 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -303,13 +303,11 @@ found:
down_write(&dev->dev.bus->subsys.rwsem);
dev->card_link = clink;
dev->dev.driver = &drv->link.driver;
- if (drv->link.driver.probe) {
- if (drv->link.driver.probe(&dev->dev)) {
- dev->dev.driver = NULL;
- dev->card_link = NULL;
- up_write(&dev->dev.bus->subsys.rwsem);
- return NULL;
- }
+ if (pnp_bus_type.probe(&dev->dev)) {
+ dev->dev.driver = NULL;
+ dev->card_link = NULL;
+ up_write(&dev->dev.bus->subsys.rwsem);
+ return NULL;
}
device_bind_driver(&dev->dev);
up_write(&dev->dev.bus->subsys.rwsem);
diff --git a/drivers/sn/Kconfig b/drivers/sn/Kconfig
index d95265b187a3d3..a3473162587745 100644
--- a/drivers/sn/Kconfig
+++ b/drivers/sn/Kconfig
@@ -3,10 +3,11 @@
#
menu "SN Devices"
+ depends on SGI_SN
config SGI_IOC4
tristate "SGI IOC4 Base IO support"
- depends on (IA64_GENERIC || IA64_SGI_SN2) && MMTIMER
+ depends on MMTIMER
default m
---help---
This option enables basic support for the SGI IOC4-based Base IO
@@ -19,7 +20,6 @@ config SGI_IOC4
config SGI_IOC3
tristate "SGI IOC3 Base IO support"
- depends on (IA64_GENERIC || IA64_SGI_SN2)
default m
---help---
This option enables basic support for the SGI IOC3-based Base IO
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c
index 12357e1fa5589e..93449a1a0065f5 100644
--- a/drivers/sn/ioc3.c
+++ b/drivers/sn/ioc3.c
@@ -62,7 +62,7 @@ static int nic_reset(struct ioc3_driver_data *idd)
return presence;
}
-static inline int nic_read_bit(struct ioc3_driver_data *idd)
+static int nic_read_bit(struct ioc3_driver_data *idd)
{
int result;
unsigned long flags;
@@ -77,7 +77,7 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
return result;
}
-static inline void nic_write_bit(struct ioc3_driver_data *idd, int bit)
+static void nic_write_bit(struct ioc3_driver_data *idd, int bit)
{
if (bit)
writel(mcr_pack(6, 110), &idd->vma->mcr);
@@ -371,8 +371,7 @@ static void probe_nic(struct ioc3_driver_data *idd)
/* Interrupts */
-static inline void
-write_ireg(struct ioc3_driver_data *idd, uint32_t val, int which)
+static void write_ireg(struct ioc3_driver_data *idd, uint32_t val, int which)
{
unsigned long flags;
@@ -735,14 +734,12 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
}
/* Add this IOC3 to all submodules */
- read_lock(&ioc3_submodules_lock);
for(id=0;id<IOC3_MAX_SUBMODULES;id++)
if(ioc3_submodules[id] && ioc3_submodules[id]->probe) {
idd->active[id] = 1;
idd->active[id] = !ioc3_submodules[id]->probe
(ioc3_submodules[id], idd);
}
- read_unlock(&ioc3_submodules_lock);
printk(KERN_INFO "IOC3 Master Driver loaded for %s\n", pci_name(pdev));
@@ -767,7 +764,6 @@ static void ioc3_remove(struct pci_dev *pdev)
idd = pci_get_drvdata(pdev);
/* Remove this IOC3 from all submodules */
- read_lock(&ioc3_submodules_lock);
for(id=0;id<IOC3_MAX_SUBMODULES;id++)
if(idd->active[id]) {
if(ioc3_submodules[id] && ioc3_submodules[id]->remove)
@@ -781,7 +777,6 @@ static void ioc3_remove(struct pci_dev *pdev)
pci_name(pdev));
idd->active[id] = 0;
}
- read_unlock(&ioc3_submodules_lock);
/* Clear and disable all IRQs */
write_ireg(idd, ~0, IOC3_W_IEC);