aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/vt.c21
-rw-r--r--drivers/char/vt_ioctl.c2
-rw-r--r--drivers/dma/dmaengine.c18
-rw-r--r--drivers/hwmon/Kconfig1
-rw-r--r--drivers/md/linear.c2
-rw-r--r--drivers/pnp/manager.c6
-rw-r--r--drivers/spi/at25.c2
-rw-r--r--drivers/spi/atmel_spi.c2
-rw-r--r--drivers/spi/spi_bitbang.c26
-rw-r--r--drivers/spi/spi_s3c24xx.c2
-rw-r--r--drivers/video/Kconfig6
-rw-r--r--drivers/video/savage/savagefb_driver.c18
-rw-r--r--drivers/video/sstfb.c1
13 files changed, 56 insertions, 51 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index c3f8e383933..1bbb45b937f 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -724,6 +724,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
return -ENOMEM;
memset(vc, 0, sizeof(*vc));
vc_cons[currcons].d = vc;
+ INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
visual_init(vc, currcons, 1);
if (!*vc->vc_uni_pagedir_loc)
con_set_default_unimap(vc);
@@ -2185,10 +2186,28 @@ static void console_callback(struct work_struct *ignored)
release_console_sem();
}
-void set_console(int nr)
+int set_console(int nr)
{
+ struct vc_data *vc = vc_cons[fg_console].d;
+
+ if (!vc_cons_allocated(nr) || vt_dont_switch ||
+ (vc->vt_mode.mode == VT_AUTO && vc->vc_mode == KD_GRAPHICS)) {
+
+ /*
+ * Console switch will fail in console_callback() or
+ * change_console() so there is no point scheduling
+ * the callback
+ *
+ * Existing set_console() users don't check the return
+ * value so this shouldn't break anything
+ */
+ return -EINVAL;
+ }
+
want_console = nr;
schedule_console_callback();
+
+ return 0;
}
struct tty_driver *console_driver;
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 3a5d301e783..1fa2da8f4fb 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -34,7 +34,7 @@
#include <linux/kbd_diacr.h>
#include <linux/selection.h>
-static char vt_dont_switch;
+char vt_dont_switch;
extern struct tty_driver *console_driver;
#define VT_IS_IN_USE(i) (console_driver->ttys[i] && console_driver->ttys[i]->count)
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 15278044295..322ee2984e3 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -176,6 +176,7 @@ void dma_chan_cleanup(struct kref *kref)
chan->client = NULL;
kref_put(&chan->device->refcount, dma_async_device_cleanup);
}
+EXPORT_SYMBOL(dma_chan_cleanup);
static void dma_chan_free_rcu(struct rcu_head *rcu)
{
@@ -261,6 +262,7 @@ struct dma_client *dma_async_client_register(dma_event_callback event_callback)
return client;
}
+EXPORT_SYMBOL(dma_async_client_register);
/**
* dma_async_client_unregister - unregister a client and free the &dma_client
@@ -287,6 +289,7 @@ void dma_async_client_unregister(struct dma_client *client)
kfree(client);
dma_chans_rebalance();
}
+EXPORT_SYMBOL(dma_async_client_unregister);
/**
* dma_async_client_chan_request - request DMA channels
@@ -304,6 +307,7 @@ void dma_async_client_chan_request(struct dma_client *client,
client->chans_desired = number;
dma_chans_rebalance();
}
+EXPORT_SYMBOL(dma_async_client_chan_request);
/**
* dma_async_device_register - registers DMA devices found
@@ -346,6 +350,7 @@ int dma_async_device_register(struct dma_device *device)
return 0;
}
+EXPORT_SYMBOL(dma_async_device_register);
/**
* dma_async_device_cleanup - function called when all references are released
@@ -390,23 +395,12 @@ void dma_async_device_unregister(struct dma_device *device)
kref_put(&device->refcount, dma_async_device_cleanup);
wait_for_completion(&device->done);
}
+EXPORT_SYMBOL(dma_async_device_unregister);
static int __init dma_bus_init(void)
{
mutex_init(&dma_list_mutex);
return class_register(&dma_devclass);
}
-
subsys_initcall(dma_bus_init);
-EXPORT_SYMBOL(dma_async_client_register);
-EXPORT_SYMBOL(dma_async_client_unregister);
-EXPORT_SYMBOL(dma_async_client_chan_request);
-EXPORT_SYMBOL(dma_async_memcpy_buf_to_buf);
-EXPORT_SYMBOL(dma_async_memcpy_buf_to_pg);
-EXPORT_SYMBOL(dma_async_memcpy_pg_to_pg);
-EXPORT_SYMBOL(dma_async_memcpy_complete);
-EXPORT_SYMBOL(dma_async_memcpy_issue_pending);
-EXPORT_SYMBOL(dma_async_device_register);
-EXPORT_SYMBOL(dma_async_device_unregister);
-EXPORT_SYMBOL(dma_chan_cleanup);
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index c3d4856fb61..6d105a1d41b 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -527,6 +527,7 @@ config SENSORS_W83792D
config SENSORS_W83793
tristate "Winbond W83793"
depends on HWMON && I2C && EXPERIMENTAL
+ select HWMON_VID
help
If you say yes here you get support for the Winbond W83793
hardware monitoring chip.
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index c625ddb8833..d5ecd2d5304 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -188,7 +188,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
for (i=0; i < cnt-1 ; i++) {
sector_t sz = 0;
int j;
- for (j=i; i<cnt-1 && sz < min_spacing ; j++)
+ for (j = i; j < cnt - 1 && sz < min_spacing; j++)
sz += conf->disks[j].size;
if (sz >= min_spacing && sz < conf->hash_spacing)
conf->hash_spacing = sz;
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index 5026b345cb3..57e6ab1004d 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -451,7 +451,7 @@ int pnp_auto_config_dev(struct pnp_dev *dev)
return -EINVAL;
if(!pnp_can_configure(dev)) {
- pnp_info("Device %s does not support resource configuration.", dev->dev.bus_id);
+ pnp_dbg("Device %s does not support resource configuration.", dev->dev.bus_id);
return -ENODEV;
}
@@ -482,7 +482,7 @@ int pnp_auto_config_dev(struct pnp_dev *dev)
int pnp_start_dev(struct pnp_dev *dev)
{
if (!pnp_can_write(dev)) {
- pnp_info("Device %s does not support activation.", dev->dev.bus_id);
+ pnp_dbg("Device %s does not support activation.", dev->dev.bus_id);
return -EINVAL;
}
@@ -506,7 +506,7 @@ int pnp_start_dev(struct pnp_dev *dev)
int pnp_stop_dev(struct pnp_dev *dev)
{
if (!pnp_can_disable(dev)) {
- pnp_info("Device %s does not support disabling.", dev->dev.bus_id);
+ pnp_dbg("Device %s does not support disabling.", dev->dev.bus_id);
return -EINVAL;
}
if (dev->protocol->disable(dev)<0) {
diff --git a/drivers/spi/at25.c b/drivers/spi/at25.c
index 48e4f48e779..8efa07e8b8c 100644
--- a/drivers/spi/at25.c
+++ b/drivers/spi/at25.c
@@ -291,7 +291,7 @@ static int at25_probe(struct spi_device *spi)
*/
sr = spi_w8r8(spi, AT25_RDSR);
if (sr < 0 || sr & AT25_SR_nRDY) {
- dev_dbg(&at25->spi->dev, "rdsr --> %d (%02x)\n", sr, sr);
+ dev_dbg(&spi->dev, "rdsr --> %d (%02x)\n", sr, sr);
err = -ENXIO;
goto fail;
}
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 6fa260d1a9b..66e7bc98579 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -425,7 +425,7 @@ static int atmel_spi_setup(struct spi_device *spi)
if (ret)
return ret;
spi->controller_state = (void *)npcs_pin;
- gpio_direction_output(npcs_pin);
+ gpio_direction_output(npcs_pin, !(spi->mode & SPI_CS_HIGH));
}
dev_dbg(&spi->dev,
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
index 24a330d8239..88425e1af4d 100644
--- a/drivers/spi/spi_bitbang.c
+++ b/drivers/spi/spi_bitbang.c
@@ -302,10 +302,6 @@ static void bitbang_work(struct work_struct *work)
setup_transfer = NULL;
list_for_each_entry (t, &m->transfers, transfer_list) {
- if (bitbang->shutdown) {
- status = -ESHUTDOWN;
- break;
- }
/* override or restore speed and wordsize */
if (t->speed_hz || t->bits_per_word) {
@@ -410,8 +406,6 @@ int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m)
m->status = -EINPROGRESS;
bitbang = spi_master_get_devdata(spi->master);
- if (bitbang->shutdown)
- return -ESHUTDOWN;
spin_lock_irqsave(&bitbang->lock, flags);
if (!spi->max_speed_hz)
@@ -507,28 +501,12 @@ EXPORT_SYMBOL_GPL(spi_bitbang_start);
*/
int spi_bitbang_stop(struct spi_bitbang *bitbang)
{
- unsigned limit = 500;
-
- spin_lock_irq(&bitbang->lock);
- bitbang->shutdown = 0;
- while (!list_empty(&bitbang->queue) && limit--) {
- spin_unlock_irq(&bitbang->lock);
+ spi_unregister_master(bitbang->master);
- dev_dbg(bitbang->master->cdev.dev, "wait for queue\n");
- msleep(10);
-
- spin_lock_irq(&bitbang->lock);
- }
- spin_unlock_irq(&bitbang->lock);
- if (!list_empty(&bitbang->queue)) {
- dev_err(bitbang->master->cdev.dev, "queue didn't empty\n");
- return -EBUSY;
- }
+ WARN_ON(!list_empty(&bitbang->queue));
destroy_workqueue(bitbang->workqueue);
- spi_unregister_master(bitbang->master);
-
return 0;
}
EXPORT_SYMBOL_GPL(spi_bitbang_stop);
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 651379c51ae..220abce63e4 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -41,7 +41,7 @@ struct s3c24xx_spi {
int len;
int count;
- int (*set_cs)(struct s3c2410_spi_info *spi,
+ void (*set_cs)(struct s3c2410_spi_info *spi,
int cs, int pol);
/* data buffers */
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 7f5a5983681..e4f0dd00ae8 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -1320,7 +1320,7 @@ config FB_AU1100
config FB_AU1200
bool "Au1200 LCD Driver"
- depends on FB && MIPS && SOC_AU1200
+ depends on (FB = y) && MIPS && SOC_AU1200
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
@@ -1470,7 +1470,7 @@ config FB_G364
config FB_68328
bool "Motorola 68328 native frame buffer support"
- depends on FB && (M68328 || M68EZ328 || M68VZ328)
+ depends on (FB = y) && (M68328 || M68EZ328 || M68VZ328)
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
@@ -1616,7 +1616,7 @@ config FB_IBM_GXT4500
config FB_PS3
bool "PS3 GPU framebuffer driver"
- depends on FB && PS3_PS3AV
+ depends on (FB = y) && PS3_PS3AV
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index 4afa30522fd..0166ec2ccf3 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -384,6 +384,19 @@ SavageSetup2DEngine(struct savagefb_par *par)
BCI_SEND(0);
BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD2);
BCI_SEND(GlobalBitmapDescriptor);
+
+ /*
+ * I don't know why, sending this twice fixes the intial black screen,
+ * prevents X from crashing at least in Toshiba laptops with SavageIX.
+ * --Tony
+ */
+ par->bci_ptr = 0;
+ par->SavageWaitFifo(par, 4);
+
+ BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD1);
+ BCI_SEND(0);
+ BCI_SEND(BCI_CMD_SETREG | (1 << 16) | BCI_GBD2);
+ BCI_SEND(GlobalBitmapDescriptor);
}
static void savagefb_set_clip(struct fb_info *info)
@@ -496,7 +509,7 @@ static int common_calc_clock(long freq, int min_m, int min_n1, int max_n1,
#ifdef SAVAGEFB_DEBUG
/* This function is used to debug, it prints out the contents of s3 regs */
-static void SavagePrintRegs(void)
+static void SavagePrintRegs(struct savagefb_par *par)
{
unsigned char i;
int vgaCRIndex = 0x3d4;
@@ -1525,7 +1538,7 @@ static int savagefb_set_par(struct fb_info *info)
savagefb_set_fix(info);
savagefb_set_clip(info);
- SavagePrintRegs();
+ SavagePrintRegs(par);
return 0;
}
@@ -2155,7 +2168,6 @@ static int __devinit savagefb_probe(struct pci_dev* dev,
int video_len;
DBG("savagefb_probe");
- SavagePrintRegs();
info = framebuffer_alloc(sizeof(struct savagefb_par), &dev->dev);
if (!info)
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
index 59cd1e750f3..62fa5500361 100644
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -257,6 +257,7 @@ static void __sst_dac_write(u8 __iomem *vbase, u8 reg, u8 val)
r_dprintk("sst_dac_write(%#x, %#x)\n", reg, val);
reg &= 0x07;
__sst_write(vbase, DAC_DATA,(((u32)reg << 8)) | (u32)val);
+ __sst_wait_idle(vbase);
}
/* indexed access to ti/att dacs */