Commit b10b09be authored by Andrew Morton's avatar Andrew Morton Committed by Greg Kroah-Hartman

[PATCH] misc fixes

- unused var warning in pnp_add_irq_resource()

- unused var in fd_mcs.c (Adrian Bunk)

- remove dead code in i810_main.c (a u8 cannot exceed 255) (Adrian Bunk)

- don't truncate dma_addr_t's in gdth.c (Jes Sorensen)

- vgastate.c needs vmalloc.h (Geert Uytterhoeven <geert@linux-m68k.org>)

- revert bogus test from rd_open() - it was a 2.4 forward-port, and 2.5
  doesn't need it.  (The gendisks aren't registered, we cannot get there
  anyway).
parent 71c19018
......@@ -271,9 +271,6 @@ static int rd_open(struct inode * inode, struct file * filp)
{
unsigned unit = minor(inode->i_rdev);
if (unit >= NUM_RAMDISKS)
return -ENODEV;
/*
* Immunize device against invalidate_buffers() and prune_icache().
*/
......
......@@ -85,7 +85,6 @@ struct pnp_option * pnp_register_dependent_option(struct pnp_dev *dev, int prior
int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data)
{
int i;
struct pnp_irq *ptr;
if (!option)
return -EINVAL;
......@@ -101,9 +100,13 @@ int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data)
option->irq = data;
#ifdef CONFIG_PCI
for (i=0; i<16; i++)
if (data->map & (1<<i))
pcibios_penalize_isa_irq(i);
{
int i;
for (i=0; i<16; i++)
if (data->map & (1<<i))
pcibios_penalize_isa_irq(i);
}
#endif
return 0;
}
......
......@@ -589,7 +589,6 @@ static int TOTAL_INTR = 0;
static int fd_mcs_proc_info(struct Scsi_Host *shpnt, char *buffer, char **start, off_t offset, int length, int inout)
{
int len = 0;
int i;
if (inout)
return (-ENOSYS);
......
......@@ -3662,7 +3662,7 @@ static int gdth_sync_event(int hanum,int service,unchar index,Scsi_Cmnd *scp)
pci_unmap_single(ha->pdev,scp->SCp.dma_handle,
scp->request_bufflen,scp->SCp.Message);
if (scp->SCp.buffer)
pci_unmap_single(ha->pdev,(dma_addr_t)(u32)scp->SCp.buffer,
pci_unmap_single(ha->pdev,(dma_addr_t)scp->SCp.buffer,
16,PCI_DMA_FROMDEVICE);
#endif
if (ha->status == S_OK) {
......
......@@ -1075,8 +1075,6 @@ static int i810fb_getcolreg(u8 regno, u8 *red, u8 *green, u8 *blue,
struct i810fb_par *par = (struct i810fb_par *) info->par;
u8 *mmio = par->mmio_start_virtual, temp;
if (regno > 255) return 1;
if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
if ((info->var.green.length == 5 && regno > 31) ||
(info->var.green.length == 6 && regno > 63))
......
......@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/fb.h>
#include <linux/vmalloc.h>
#include <video/vga.h>
struct regstate {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment