summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/comedi_fops.c4
-rw-r--r--drivers/staging/comedi/drivers/ni_daq_dio24.c1
-rw-r--r--drivers/staging/comedi/drivers/quatech_daqp_cs.c2
-rw-r--r--drivers/staging/dgrp/dgrp_specproc.c68
-rw-r--r--drivers/staging/goldfish/Kconfig1
-rw-r--r--drivers/staging/goldfish/goldfish_nand.c8
-rw-r--r--drivers/staging/xgifb/XGI_main_26.c1
-rw-r--r--drivers/staging/xgifb/vb_setmode.c305
-rw-r--r--drivers/staging/zram/zram_drv.c2
9 files changed, 164 insertions, 228 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index b1e8cdbd1ce7..195d56d8a1ee 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2372,7 +2372,7 @@ int comedi_alloc_subdevice_minor(struct comedi_subdevice *s)
spin_unlock(&comedi_file_info_table_lock);
if (i == COMEDI_NUM_MINORS) {
kfree(info);
- pr_err("comedi: error: ran out of minor numbers for board device files.\n");
+ pr_err("comedi: error: ran out of minor numbers for subdevice files.\n");
return -EBUSY;
}
s->minor = i;
@@ -2383,7 +2383,7 @@ int comedi_alloc_subdevice_minor(struct comedi_subdevice *s)
s->class_dev = csdev;
dev_set_drvdata(csdev, info);
- return i;
+ return 0;
}
void comedi_free_subdevice_minor(struct comedi_subdevice *s)
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index 32ee22dbb858..e1cc9d01f200 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -56,6 +56,7 @@ static int dio24_auto_attach(struct comedi_device *dev,
link->config_flags |= CONF_AUTO_SET_IO;
ret = comedi_pcmcia_enable(dev, NULL);
+ if (ret)
return ret;
dev->iobase = link->resource[0]->start;
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
index 6ab9083a032f..911eb6b32296 100644
--- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c
+++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
@@ -723,7 +723,7 @@ static int daqp_auto_attach(struct comedi_device *dev,
dev->private = devpriv;
link->config_flags |= CONF_AUTO_SET_IO | CONF_ENABLE_IRQ;
- ret = comedi_pcmcia_enable(dev);
+ ret = comedi_pcmcia_enable(dev, NULL);
if (ret)
return ret;
dev->iobase = link->resource[0]->start;
diff --git a/drivers/staging/dgrp/dgrp_specproc.c b/drivers/staging/dgrp/dgrp_specproc.c
index e09fc9cf318b..dfdaede71ff4 100644
--- a/drivers/staging/dgrp/dgrp_specproc.c
+++ b/drivers/staging/dgrp/dgrp_specproc.c
@@ -81,33 +81,34 @@ static struct dgrp_proc_entry dgrp_mon_table[];
static struct dgrp_proc_entry dgrp_ports_table[];
static struct dgrp_proc_entry dgrp_dpa_table[];
-static ssize_t config_proc_write(struct file *file, const char __user *buffer,
- size_t count, loff_t *pos);
+static ssize_t dgrp_config_proc_write(struct file *file,
+ const char __user *buffer,
+ size_t count, loff_t *pos);
-static int nodeinfo_proc_open(struct inode *inode, struct file *file);
-static int info_proc_open(struct inode *inode, struct file *file);
-static int config_proc_open(struct inode *inode, struct file *file);
+static int dgrp_nodeinfo_proc_open(struct inode *inode, struct file *file);
+static int dgrp_info_proc_open(struct inode *inode, struct file *file);
+static int dgrp_config_proc_open(struct inode *inode, struct file *file);
static struct file_operations config_proc_file_ops = {
.owner = THIS_MODULE,
- .open = config_proc_open,
+ .open = dgrp_config_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
- .write = config_proc_write
+ .write = dgrp_config_proc_write,
};
static struct file_operations info_proc_file_ops = {
.owner = THIS_MODULE,
- .open = info_proc_open,
+ .open = dgrp_info_proc_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = seq_release,
+ .release = single_release,
};
static struct file_operations nodeinfo_proc_file_ops = {
.owner = THIS_MODULE,
- .open = nodeinfo_proc_open,
+ .open = dgrp_nodeinfo_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
@@ -405,21 +406,21 @@ done:
return 0;
}
-static void *config_proc_start(struct seq_file *m, loff_t *pos)
+static void *dgrp_config_proc_start(struct seq_file *m, loff_t *pos)
{
return seq_list_start_head(&nd_struct_list, *pos);
}
-static void *config_proc_next(struct seq_file *p, void *v, loff_t *pos)
+static void *dgrp_config_proc_next(struct seq_file *p, void *v, loff_t *pos)
{
return seq_list_next(v, &nd_struct_list, pos);
}
-static void config_proc_stop(struct seq_file *m, void *v)
+static void dgrp_config_proc_stop(struct seq_file *m, void *v)
{
}
-static int config_proc_show(struct seq_file *m, void *v)
+static int dgrp_config_proc_show(struct seq_file *m, void *v)
{
struct nd_struct *nd;
char tmp_id[4];
@@ -445,13 +446,13 @@ static int config_proc_show(struct seq_file *m, void *v)
}
static const struct seq_operations proc_config_ops = {
- .start = config_proc_start,
- .next = config_proc_next,
- .stop = config_proc_stop,
- .show = config_proc_show
+ .start = dgrp_config_proc_start,
+ .next = dgrp_config_proc_next,
+ .stop = dgrp_config_proc_stop,
+ .show = dgrp_config_proc_show,
};
-static int config_proc_open(struct inode *inode, struct file *file)
+static int dgrp_config_proc_open(struct inode *inode, struct file *file)
{
return seq_open(file, &proc_config_ops);
}
@@ -462,8 +463,9 @@ static int config_proc_open(struct inode *inode, struct file *file)
* write) is treated as an independent request. See the "parse"
* description for more details.
*/
-static ssize_t config_proc_write(struct file *file, const char __user *buffer,
- size_t count, loff_t *pos)
+static ssize_t dgrp_config_proc_write(struct file *file,
+ const char __user *buffer,
+ size_t count, loff_t *pos)
{
ssize_t retval;
char *inbuf, *sp;
@@ -627,7 +629,7 @@ static int parse_write_config(char *buf)
return retval;
}
-static int info_proc_show(struct seq_file *m, void *v)
+static int dgrp_info_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, "version: %s\n", DIGI_VERSION);
seq_puts(m, "register_with_sysfs: 1\n");
@@ -637,27 +639,27 @@ static int info_proc_show(struct seq_file *m, void *v)
return 0;
}
-static int info_proc_open(struct inode *inode, struct file *file)
+static int dgrp_info_proc_open(struct inode *inode, struct file *file)
{
- return single_open(file, info_proc_show, NULL);
+ return single_open(file, dgrp_info_proc_show, NULL);
}
-static void *nodeinfo_start(struct seq_file *m, loff_t *pos)
+static void *dgrp_nodeinfo_start(struct seq_file *m, loff_t *pos)
{
return seq_list_start_head(&nd_struct_list, *pos);
}
-static void *nodeinfo_next(struct seq_file *p, void *v, loff_t *pos)
+static void *dgrp_nodeinfo_next(struct seq_file *p, void *v, loff_t *pos)
{
return seq_list_next(v, &nd_struct_list, pos);
}
-static void nodeinfo_stop(struct seq_file *m, void *v)
+static void dgrp_nodeinfo_stop(struct seq_file *m, void *v)
{
}
-static int nodeinfo_show(struct seq_file *m, void *v)
+static int dgrp_nodeinfo_show(struct seq_file *m, void *v)
{
struct nd_struct *nd;
char hwver[8];
@@ -699,13 +701,13 @@ static int nodeinfo_show(struct seq_file *m, void *v)
static const struct seq_operations nodeinfo_ops = {
- .start = nodeinfo_start,
- .next = nodeinfo_next,
- .stop = nodeinfo_stop,
- .show = nodeinfo_show
+ .start = dgrp_nodeinfo_start,
+ .next = dgrp_nodeinfo_next,
+ .stop = dgrp_nodeinfo_stop,
+ .show = dgrp_nodeinfo_show,
};
-static int nodeinfo_proc_open(struct inode *inode, struct file *file)
+static int dgrp_nodeinfo_proc_open(struct inode *inode, struct file *file)
{
return seq_open(file, &nodeinfo_ops);
}
diff --git a/drivers/staging/goldfish/Kconfig b/drivers/staging/goldfish/Kconfig
index d6c98d0d81e7..4e094602437c 100644
--- a/drivers/staging/goldfish/Kconfig
+++ b/drivers/staging/goldfish/Kconfig
@@ -7,6 +7,7 @@ config GOLDFISH_AUDIO
config MTD_GOLDFISH_NAND
tristate "Goldfish NAND device"
depends on GOLDFISH
+ depends on MTD
help
Drives the emulated NAND flash device on the Google Goldfish
Android virtual device.
diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c
index 1891d89630dc..ab1f01952b48 100644
--- a/drivers/staging/goldfish/goldfish_nand.c
+++ b/drivers/staging/goldfish/goldfish_nand.c
@@ -156,7 +156,7 @@ static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs,
return 0;
invalid_arg:
- pr_err("goldfish_nand_read_oob: invalid read, start %llx, len %x, ooblen %x, dev_size %llx, write_size %x\n",
+ pr_err("goldfish_nand_read_oob: invalid read, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n",
ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize);
return -EINVAL;
}
@@ -188,7 +188,7 @@ static int goldfish_nand_write_oob(struct mtd_info *mtd, loff_t ofs,
return 0;
invalid_arg:
- pr_err("goldfish_nand_write_oob: invalid write, start %llx, len %x, ooblen %x, dev_size %llx, write_size %x\n",
+ pr_err("goldfish_nand_write_oob: invalid write, start %llx, len %zx, ooblen %zx, dev_size %llx, write_size %x\n",
ofs, ops->len, ops->ooblen, mtd->size, mtd->writesize);
return -EINVAL;
}
@@ -212,7 +212,7 @@ static int goldfish_nand_read(struct mtd_info *mtd, loff_t from, size_t len,
return 0;
invalid_arg:
- pr_err("goldfish_nand_read: invalid read, start %llx, len %x, dev_size %llx, write_size %x\n",
+ pr_err("goldfish_nand_read: invalid read, start %llx, len %zx, dev_size %llx, write_size %x\n",
from, len, mtd->size, mtd->writesize);
return -EINVAL;
}
@@ -236,7 +236,7 @@ static int goldfish_nand_write(struct mtd_info *mtd, loff_t to, size_t len,
return 0;
invalid_arg:
- pr_err("goldfish_nand_write: invalid write, start %llx, len %x, dev_size %llx, write_size %x\n",
+ pr_err("goldfish_nand_write: invalid write, start %llx, len %zx, dev_size %llx, write_size %x\n",
to, len, mtd->size, mtd->writesize);
return -EINVAL;
}
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 387d1bd0c418..801ac4053a7a 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -209,6 +209,7 @@ void XGIRegInit(struct vb_device_info *XGI_Pr, unsigned long BaseAddr)
XGI_Pr->P3c0 = BaseAddr + 0x10;
XGI_Pr->P3ce = BaseAddr + 0x1e;
XGI_Pr->P3c2 = BaseAddr + 0x12;
+ XGI_Pr->P3cc = BaseAddr + 0x1c;
XGI_Pr->P3ca = BaseAddr + 0x1a;
XGI_Pr->P3c6 = BaseAddr + 0x16;
XGI_Pr->P3c7 = BaseAddr + 0x17;
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index bd816567ab2a..3d5c4244c809 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -865,53 +865,42 @@ static unsigned short XGI_GetVCLK2Ptr(unsigned short ModeNo,
/* si+Ext_ResInfo */
modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
- if (pVBInfo->IF_DEF_LVDS == 0) {
- if (pVBInfo->VBInfo &
- (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { /*301b*/
- if (pVBInfo->LCDResInfo != Panel_1024x768)
- /* LCDXlat2VCLK */
- VCLKIndex = VCLK108_2_315 + 5;
- else
- VCLKIndex = VCLK65_315 + 2; /* LCDXlat1VCLK */
- } else if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
- if (pVBInfo->SetFlag & RPLLDIV2XO)
- VCLKIndex = TVCLKBASE_315_25 + HiTVVCLKDIV2;
- else
- VCLKIndex = TVCLKBASE_315_25 + HiTVVCLK;
+ if (pVBInfo->VBInfo & (SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { /*301b*/
+ if (pVBInfo->LCDResInfo != Panel_1024x768)
+ /* LCDXlat2VCLK */
+ VCLKIndex = VCLK108_2_315 + 5;
+ else
+ VCLKIndex = VCLK65_315 + 2; /* LCDXlat1VCLK */
+ } else if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
+ if (pVBInfo->SetFlag & RPLLDIV2XO)
+ VCLKIndex = TVCLKBASE_315_25 + HiTVVCLKDIV2;
+ else
+ VCLKIndex = TVCLKBASE_315_25 + HiTVVCLK;
- if (pVBInfo->SetFlag & TVSimuMode) {
- if (modeflag & Charx8Dot) {
- VCLKIndex = TVCLKBASE_315_25 +
- HiTVSimuVCLK;
- } else {
- VCLKIndex = TVCLKBASE_315_25 +
- HiTVTextVCLK;
- }
+ if (pVBInfo->SetFlag & TVSimuMode) {
+ if (modeflag & Charx8Dot) {
+ VCLKIndex = TVCLKBASE_315_25 + HiTVSimuVCLK;
+ } else {
+ VCLKIndex = TVCLKBASE_315_25 + HiTVTextVCLK;
}
+ }
- /* 301lv */
- if (pVBInfo->VBType & VB_SIS301LV) {
- if (pVBInfo->SetFlag & RPLLDIV2XO)
- VCLKIndex = YPbPr525iVCLK_2;
- else
- VCLKIndex = YPbPr525iVCLK;
- }
- } else if (pVBInfo->VBInfo & SetCRT2ToTV) {
+ /* 301lv */
+ if (pVBInfo->VBType & VB_SIS301LV) {
if (pVBInfo->SetFlag & RPLLDIV2XO)
- VCLKIndex = TVCLKBASE_315_25 + TVVCLKDIV2;
+ VCLKIndex = YPbPr525iVCLK_2;
else
- VCLKIndex = TVCLKBASE_315_25 + TVVCLK;
- } else { /* for CRT2 */
- /* di+Ext_CRTVCLK */
- VCLKIndex = XGI330_RefIndex[RefreshRateTableIndex].
- Ext_CRTVCLK;
- VCLKIndex &= IndexMask;
+ VCLKIndex = YPbPr525iVCLK;
}
- } else if ((pVBInfo->LCDResInfo == Panel_800x600) ||
- (pVBInfo->LCDResInfo == Panel_320x480)) { /* LVDS */
- VCLKIndex = VCLK40; /* LVDSXlat1VCLK */
- } else {
- VCLKIndex = VCLK65_315 + 2; /* LVDSXlat2VCLK, LVDSXlat3VCLK */
+ } else if (pVBInfo->VBInfo & SetCRT2ToTV) {
+ if (pVBInfo->SetFlag & RPLLDIV2XO)
+ VCLKIndex = TVCLKBASE_315_25 + TVVCLKDIV2;
+ else
+ VCLKIndex = TVCLKBASE_315_25 + TVVCLK;
+ } else { /* for CRT2 */
+ /* di+Ext_CRTVCLK */
+ VCLKIndex = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK;
+ VCLKIndex &= IndexMask;
}
return VCLKIndex;
@@ -2005,40 +1994,28 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
temp = xgifb_reg_get(pVBInfo->P3d4, 0x38);
- if (pVBInfo->IF_DEF_LVDS == 0) {
- if (pVBInfo->VBType &
- (VB_SIS302B |
- VB_SIS301LV |
- VB_SIS302LV |
- VB_XGI301C)) {
- if (temp & EnableDualEdge) {
- tempbx |= SetCRT2ToDualEdge;
- if (temp & SetToLCDA)
- tempbx |= XGI_SetCRT2ToLCDA;
- }
+ if (pVBInfo->VBType & (VB_SIS302B | VB_SIS301LV | VB_SIS302LV |
+ VB_XGI301C)) {
+ if (temp & EnableDualEdge) {
+ tempbx |= SetCRT2ToDualEdge;
+ if (temp & SetToLCDA)
+ tempbx |= XGI_SetCRT2ToLCDA;
}
}
if (pVBInfo->IF_DEF_YPbPr == 1) {
- if (((pVBInfo->IF_DEF_LVDS == 0) &&
- ((pVBInfo->VBType & VB_SIS301LV) ||
- (pVBInfo->VBType & VB_SIS302LV) ||
- (pVBInfo->VBType & VB_XGI301C)))) {
+ if (pVBInfo->VBType & (VB_SIS301LV|VB_SIS302LV|VB_XGI301C)) {
if (temp & SetYPbPr) {
if (pVBInfo->IF_DEF_HiVision == 1) {
- /* shampoo add for new
- * scratch */
- temp = xgifb_reg_get(
- pVBInfo->P3d4,
- 0x35);
+ /* shampoo add for new scratch */
+ temp = xgifb_reg_get(pVBInfo->P3d4,
+ 0x35);
temp &= YPbPrMode;
tempbx |= SetCRT2ToHiVision;
if (temp != YPbPrMode1080i) {
- tempbx &=
- (~SetCRT2ToHiVision);
- tempbx |=
- SetCRT2ToYPbPr525750;
+ tempbx &= (~SetCRT2ToHiVision);
+ tempbx |= SetCRT2ToYPbPr525750;
}
}
}
@@ -2047,19 +2024,15 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
tempax = push; /* restore CR31 */
- if (pVBInfo->IF_DEF_LVDS == 0) {
- if (pVBInfo->IF_DEF_YPbPr == 1) {
- if (pVBInfo->IF_DEF_HiVision == 1)
- temp = 0x09FC;
- else
- temp = 0x097C;
- } else if (pVBInfo->IF_DEF_HiVision == 1) {
- temp = 0x01FC;
- } else {
- temp = 0x017C;
- }
- } else { /* 3rd party chip */
- temp = SetCRT2ToLCD;
+ if (pVBInfo->IF_DEF_YPbPr == 1) {
+ if (pVBInfo->IF_DEF_HiVision == 1)
+ temp = 0x09FC;
+ else
+ temp = 0x097C;
+ } else if (pVBInfo->IF_DEF_HiVision == 1) {
+ temp = 0x01FC;
+ } else {
+ temp = 0x017C;
}
if (!(tempbx & temp)) {
@@ -2070,14 +2043,11 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
if (!(pVBInfo->VBType & VB_NoLCD)) {
if (tempbx & XGI_SetCRT2ToLCDA) {
if (tempbx & SetSimuScanMode)
- tempbx &= (~(SetCRT2ToLCD |
- SetCRT2ToRAMDAC |
+ tempbx &= (~(SetCRT2ToLCD | SetCRT2ToRAMDAC |
SwitchCRT2));
else
- tempbx &= (~(SetCRT2ToLCD |
- SetCRT2ToRAMDAC |
- SetCRT2ToTV |
- SwitchCRT2));
+ tempbx &= (~(SetCRT2ToLCD | SetCRT2ToRAMDAC |
+ SetCRT2ToTV | SwitchCRT2));
}
}
@@ -2086,49 +2056,38 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
if (!(tempbx & (SwitchCRT2 | SetSimuScanMode))) {
if (pVBInfo->IF_DEF_CRT2Monitor == 1) {
if (tempbx & SetCRT2ToRAMDAC) {
- tempbx &= (0xFF00 |
- SetCRT2ToRAMDAC |
- SwitchCRT2 |
- SetSimuScanMode);
+ tempbx &= (0xFF00 | SetCRT2ToRAMDAC |
+ SwitchCRT2 | SetSimuScanMode);
tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750));
}
} else {
- tempbx &= (~(SetCRT2ToRAMDAC |
- SetCRT2ToLCD |
+ tempbx &= (~(SetCRT2ToRAMDAC | SetCRT2ToLCD |
SetCRT2ToTV));
}
}
if (!(pVBInfo->VBType & VB_NoLCD)) {
if (tempbx & SetCRT2ToLCD) {
- tempbx &= (0xFF00 |
- SetCRT2ToLCD |
- SwitchCRT2 |
+ tempbx &= (0xFF00 | SetCRT2ToLCD | SwitchCRT2 |
SetSimuScanMode);
tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750));
}
}
if (tempbx & SetCRT2ToSCART) {
- tempbx &= (0xFF00 |
- SetCRT2ToSCART |
- SwitchCRT2 |
+ tempbx &= (0xFF00 | SetCRT2ToSCART | SwitchCRT2 |
SetSimuScanMode);
tempbx &= (0x00FF | (~SetCRT2ToYPbPr525750));
}
if (pVBInfo->IF_DEF_YPbPr == 1) {
if (tempbx & SetCRT2ToYPbPr525750)
- tempbx &= (0xFF00 |
- SwitchCRT2 |
- SetSimuScanMode);
+ tempbx &= (0xFF00 | SwitchCRT2 | SetSimuScanMode);
}
if (pVBInfo->IF_DEF_HiVision == 1) {
if (tempbx & SetCRT2ToHiVision)
- tempbx &= (0xFF00 |
- SetCRT2ToHiVision |
- SwitchCRT2 |
+ tempbx &= (0xFF00 | SetCRT2ToHiVision | SwitchCRT2 |
SetSimuScanMode);
}
@@ -2138,19 +2097,15 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
}
if (!(tempbx & DisableCRT2Display)) {
- if ((!(tempbx & DriverMode)) ||
- (!(modeflag & CRT2Mode))) {
+ if ((!(tempbx & DriverMode)) || (!(modeflag & CRT2Mode))) {
if (!(tempbx & XGI_SetCRT2ToLCDA))
- tempbx |= (SetInSlaveMode |
- SetSimuScanMode);
+ tempbx |= (SetInSlaveMode | SetSimuScanMode);
}
/* LCD+TV can't support in slave mode
* (Force LCDA+TV->LCDB) */
- if ((tempbx & SetInSlaveMode) &&
- (tempbx & XGI_SetCRT2ToLCDA)) {
- tempbx ^= (SetCRT2ToLCD |
- XGI_SetCRT2ToLCDA |
+ if ((tempbx & SetInSlaveMode) && (tempbx & XGI_SetCRT2ToLCDA)) {
+ tempbx ^= (SetCRT2ToLCD | XGI_SetCRT2ToLCDA |
SetCRT2ToDualEdge);
pVBInfo->SetFlag |= ReserveTVOption;
}
@@ -2182,10 +2137,8 @@ static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
TVSetNTSCJ |
TVSetPAL);
- if (pVBInfo->IF_DEF_LVDS == 0) {
- if (pVBInfo->VBInfo & SetCRT2ToSCART)
- tempbx |= TVSetPAL;
- }
+ if (pVBInfo->VBInfo & SetCRT2ToSCART)
+ tempbx |= TVSetPAL;
if (pVBInfo->IF_DEF_YPbPr == 1) {
if (pVBInfo->VBInfo & SetCRT2ToYPbPr525750) {
@@ -2207,33 +2160,26 @@ static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
tempbx = tempbx | TVSetHiVision | TVSetPAL;
}
- if (pVBInfo->IF_DEF_LVDS == 0) { /* shampoo */
- if ((pVBInfo->VBInfo & SetInSlaveMode) &&
- (!(pVBInfo->VBInfo & SetNotSimuMode)))
- tempbx |= TVSimuMode;
+ if ((pVBInfo->VBInfo & SetInSlaveMode) &&
+ (!(pVBInfo->VBInfo & SetNotSimuMode)))
+ tempbx |= TVSimuMode;
- if (!(tempbx & TVSetPAL) &&
- (modeflag > 13) &&
- (resinfo == 8)) /* NTSC 1024x768, */
- tempbx |= NTSC1024x768;
+ if (!(tempbx & TVSetPAL) && (modeflag > 13) && (resinfo == 8))
+ /* NTSC 1024x768, */
+ tempbx |= NTSC1024x768;
- tempbx |= RPLLDIV2XO;
+ tempbx |= RPLLDIV2XO;
- if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
- if (pVBInfo->VBInfo & SetInSlaveMode)
- tempbx &= (~RPLLDIV2XO);
- } else if (tempbx &
- (TVSetYPbPr525p | TVSetYPbPr750p)) {
- tempbx &= (~RPLLDIV2XO);
- } else if (!(pVBInfo->VBType &
- (VB_SIS301B |
- VB_SIS302B |
- VB_SIS301LV |
- VB_SIS302LV |
- VB_XGI301C))) {
- if (tempbx & TVSimuMode)
- tempbx &= (~RPLLDIV2XO);
- }
+ if (pVBInfo->VBInfo & SetCRT2ToHiVision) {
+ if (pVBInfo->VBInfo & SetInSlaveMode)
+ tempbx &= (~RPLLDIV2XO);
+ } else if (tempbx & (TVSetYPbPr525p | TVSetYPbPr750p)) {
+ tempbx &= (~RPLLDIV2XO);
+ } else if (!(pVBInfo->VBType & (VB_SIS301B | VB_SIS302B |
+ VB_SIS301LV | VB_SIS302LV |
+ VB_XGI301C))) {
+ if (tempbx & TVSimuMode)
+ tempbx &= (~RPLLDIV2XO);
}
}
pVBInfo->TVInfo = tempbx;
@@ -2294,21 +2240,18 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeNo,
tempax = pVBInfo->LCDCapList[LCDIdIndex].LCD_Capability;
- if (pVBInfo->IF_DEF_LVDS == 0) { /* shampoo */
- if (((pVBInfo->VBType & VB_SIS302LV) || (pVBInfo->VBType
- & VB_XGI301C)) && (tempax & XGI_LCDDualLink)) {
- tempbx |= SetLCDDualLink;
- }
+ if (((pVBInfo->VBType & VB_SIS302LV) ||
+ (pVBInfo->VBType & VB_XGI301C)) && (tempax & XGI_LCDDualLink))
+ tempbx |= SetLCDDualLink;
- if ((pVBInfo->LCDResInfo == Panel_1400x1050) && (pVBInfo->VBInfo
- & SetCRT2ToLCD) && (resinfo == 9) &&
- (!(tempbx & EnableScalingLCD)))
- /*
- * set to center in 1280x1024 LCDB
- * for Panel_1400x1050
- */
- tempbx |= SetLCDtoNonExpanding;
- }
+ if ((pVBInfo->LCDResInfo == Panel_1400x1050) &&
+ (pVBInfo->VBInfo & SetCRT2ToLCD) && (resinfo == 9) &&
+ (!(tempbx & EnableScalingLCD)))
+ /*
+ * set to center in 1280x1024 LCDB
+ * for Panel_1400x1050
+ */
+ tempbx |= SetLCDtoNonExpanding;
if (pVBInfo->VBInfo & SetInSlaveMode) {
if (pVBInfo->VBInfo & SetNotSimuMode)
@@ -2583,36 +2526,34 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo,
if (!(pVBInfo->VBInfo & SetCRT2ToLCD))
goto exit;
- if (pVBInfo->IF_DEF_LVDS == 0) {
- if (pVBInfo->LCDResInfo == Panel_1600x1200) {
- if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
- if (yres == 1024)
- yres = 1056;
- }
+ if (pVBInfo->LCDResInfo == Panel_1600x1200) {
+ if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
+ if (yres == 1024)
+ yres = 1056;
}
+ }
- if (pVBInfo->LCDResInfo == Panel_1280x1024) {
- if (yres == 400)
- yres = 405;
- else if (yres == 350)
- yres = 360;
+ if (pVBInfo->LCDResInfo == Panel_1280x1024) {
+ if (yres == 400)
+ yres = 405;
+ else if (yres == 350)
+ yres = 360;
- if (pVBInfo->LCDInfo & XGI_LCDVESATiming) {
- if (yres == 360)
- yres = 375;
- }
+ if (pVBInfo->LCDInfo & XGI_LCDVESATiming) {
+ if (yres == 360)
+ yres = 375;
}
+ }
- if (pVBInfo->LCDResInfo == Panel_1024x768) {
- if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
- if (!(pVBInfo->LCDInfo & LCDNonExpanding)) {
- if (yres == 350)
- yres = 357;
- else if (yres == 400)
- yres = 420;
- else if (yres == 480)
- yres = 525;
- }
+ if (pVBInfo->LCDResInfo == Panel_1024x768) {
+ if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
+ if (!(pVBInfo->LCDInfo & LCDNonExpanding)) {
+ if (yres == 350)
+ yres = 357;
+ else if (yres == 400)
+ yres = 420;
+ else if (yres == 480)
+ yres = 525;
}
}
}
@@ -4922,16 +4863,6 @@ static void XGI_SetDelayComp(struct vb_device_info *pVBInfo)
}
xgifb_reg_set(pVBInfo->Part1Port, 0x2D, tempah);
}
- } else if (pVBInfo->IF_DEF_LVDS == 1) {
- tempbl = 0;
- tempbh = 0;
- if (pVBInfo->VBInfo & SetCRT2ToLCD) {
- tempah = XGI301LCDDelay;
- tempah &= 0x0f;
- tempah = tempah << 4;
- xgifb_reg_and_or(pVBInfo->Part1Port, 0x2D, 0x0f,
- tempah);
- }
}
}
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 9ac140bbabc5..6094e80aac10 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -464,7 +464,7 @@ error:
bio_io_error(bio);
}
-void __zram_reset_device(struct zram *zram)
+static void __zram_reset_device(struct zram *zram)
{
size_t index;
struct zram_meta *meta;