Commit 802bee33 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] remove special cases from ide_proc

parent 2101dbee
/*
* linux/drivers/ide/ide-proc.c Version 1.03 January 2, 1998
* linux/drivers/ide/ide-proc.c Version 1.05 Mar 05, 2003
*
* Copyright (C) 1997-1998 Mark Lord
* Copyright (C) 2003 Red Hat <alan@redhat.com>
*/
/*
......@@ -57,7 +58,6 @@
*/
#include <linux/config.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <asm/uaccess.h>
......@@ -365,6 +365,7 @@ static int proc_ide_read_imodel
case ide_cy82c693: name = "cy82c693"; break;
case ide_4drives: name = "4drives"; break;
case ide_pmac: name = "mac-io"; break;
case ide_pc9800: name = "pc9800"; break;
default: name = "(unknown)"; break;
}
len = sprintf(page, "%s\n", name);
......@@ -568,14 +569,10 @@ int proc_ide_read_capacity
(char *page, char **start, off_t off, int count, int *eof, void *data)
{
ide_drive_t *drive = (ide_drive_t *) data;
ide_driver_t *driver = (ide_driver_t *) drive->driver;
int len;
if (!driver)
len = sprintf(page, "(none)\n");
else
len = sprintf(page,"%llu\n",
(long long) ((ide_driver_t *)drive->driver)->capacity(drive));
(long long) (DRIVER(drive)->capacity(drive)));
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
}
......@@ -620,9 +617,6 @@ int proc_ide_read_driver
ide_driver_t *driver = drive->driver;
int len;
if (!driver)
len = sprintf(page, "(none)\n");
else
len = sprintf(page, "%s version %s\n",
driver->name, driver->version);
PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
......@@ -775,7 +769,6 @@ void destroy_proc_ide_device(ide_hwif_t *hwif, ide_drive_t *drive)
ide_driver_t *driver = drive->driver;
if (drive->proc) {
if (driver)
ide_remove_proc_entries(drive->proc, driver->proc);
ide_remove_proc_entries(drive->proc, generic_drive_entries);
remove_proc_entry(drive->name, proc_ide_root);
......
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