Commit 8cd6e401 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] ide: remove useless /proc/ide/siimage from siimage.c

It only gives (not mapped in case of MMIO) DMA base addresses.
The same info is given during driver initialization (if BM-DMA is used)
or can be obtained from 'lspci -v' output (if MMIO-DMA is used).
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b0134e31
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* if neccessary * if neccessary
*/ */
#include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -34,15 +33,6 @@ ...@@ -34,15 +33,6 @@
#include "siimage.h" #include "siimage.h"
#if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS)
#include <linux/proc_fs.h>
static u8 siimage_proc = 0;
#define SIIMAGE_MAX_DEVS 16
static struct pci_dev *siimage_devs[SIIMAGE_MAX_DEVS];
static int n_siimage_devs;
#endif /* defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS) */
/** /**
* pdev_is_sata - check if device is SATA * pdev_is_sata - check if device is SATA
* @pdev: PCI device to check * @pdev: PCI device to check
...@@ -121,67 +111,6 @@ static inline unsigned long siimage_seldev(ide_drive_t *drive, int r) ...@@ -121,67 +111,6 @@ static inline unsigned long siimage_seldev(ide_drive_t *drive, int r)
return base; return base;
} }
#if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS)
/**
* print_siimage_get_info - print minimal proc information
* @buf: buffer to write into (kernel space)
* @dev: PCI device we are describing
* @index: Controller number
*
* Print the basic information for the state of the CMD680/SI3112
* channel. We don't actually dump a lot of information out for
* this controller although we could expand it if we needed.
*/
static char *print_siimage_get_info (char *buf, struct pci_dev *dev, int index)
{
char *p = buf;
u8 mmio = (pci_get_drvdata(dev) != NULL) ? 1 : 0;
unsigned long bmdma = pci_resource_start(dev, 4);
if(mmio)
bmdma = pci_resource_start(dev, 5);
p += sprintf(p, "\nController: %d\n", index);
p += sprintf(p, "SiI%x Chipset.\n", dev->device);
if (mmio)
p += sprintf(p, "MMIO Base 0x%lx\n", bmdma);
p += sprintf(p, "%s-DMA Base 0x%lx\n", (mmio)?"MMIO":"BM", bmdma);
p += sprintf(p, "%s-DMA Base 0x%lx\n", (mmio)?"MMIO":"BM", bmdma+8);
return (char *)p;
}
/**
* siimage_get_info - proc callback
* @buffer: kernel buffer to complete
* @addr: written with base of data to return
* offset: seek offset
* count: bytes to fill in
*
* Called when the user reads data from the virtual file for this
* controller from /proc
*/
static int siimage_get_info (char *buffer, char **addr, off_t offset, int count)
{
char *p = buffer;
int len;
u16 i;
p += sprintf(p, "\n");
for (i = 0; i < n_siimage_devs; i++) {
struct pci_dev *dev = siimage_devs[i];
p = print_siimage_get_info(p, dev, i);
}
/* p - buffer must be less than 4k! */
len = (p - buffer) - offset;
*addr = buffer + offset;
return len > count ? count : len;
}
#endif /* defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS) */
/** /**
* siimage_ratemask - Compute available modes * siimage_ratemask - Compute available modes
* @drive: IDE drive * @drive: IDE drive
...@@ -779,15 +708,6 @@ static void proc_reports_siimage (struct pci_dev *dev, u8 clocking, const char * ...@@ -779,15 +708,6 @@ static void proc_reports_siimage (struct pci_dev *dev, u8 clocking, const char *
case 0x00: printk("== 100\n"); break; case 0x00: printk("== 100\n"); break;
} }
} }
#if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS)
siimage_devs[n_siimage_devs++] = dev;
if (!siimage_proc) {
siimage_proc = 1;
ide_pci_create_host_proc("siimage", siimage_get_info);
}
#endif /* DISPLAY_SIIMAGE_TIMINGS && CONFIG_PROC_FS */
} }
/** /**
......
#ifndef SIIMAGE_H #ifndef SIIMAGE_H
#define SIIMAGE_H #define SIIMAGE_H
#include <linux/config.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/ide.h> #include <linux/ide.h>
#include <asm/io.h> #include <asm/io.h>
#define DISPLAY_SIIMAGE_TIMINGS
#undef SIIMAGE_VIRTUAL_DMAPIO #undef SIIMAGE_VIRTUAL_DMAPIO
#undef SIIMAGE_BUFFERED_TASKFILE #undef SIIMAGE_BUFFERED_TASKFILE
#undef SIIMAGE_LARGE_DMA #undef SIIMAGE_LARGE_DMA
......
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