Commit bb380d82 authored by Adrian Bunk's avatar Adrian Bunk Committed by Bartlomiej Zolnierkiewicz

[ide] possible cleanups

This patch contains the following possible cleanups:
- make some needlessly global code static
- ide-dma.c: remove the unneeded EXPORT_SYMBOL(__ide_dma_test_irq)

slightly changed by me (bart)
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent cbd0b5b7
...@@ -631,7 +631,7 @@ int __ide_dma_end (ide_drive_t *drive) ...@@ -631,7 +631,7 @@ int __ide_dma_end (ide_drive_t *drive)
EXPORT_SYMBOL(__ide_dma_end); EXPORT_SYMBOL(__ide_dma_end);
/* returns 1 if dma irq issued, 0 otherwise */ /* returns 1 if dma irq issued, 0 otherwise */
int __ide_dma_test_irq (ide_drive_t *drive) static int __ide_dma_test_irq(ide_drive_t *drive)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
u8 dma_stat = hwif->INB(hwif->dma_status); u8 dma_stat = hwif->INB(hwif->dma_status);
...@@ -650,8 +650,6 @@ int __ide_dma_test_irq (ide_drive_t *drive) ...@@ -650,8 +650,6 @@ int __ide_dma_test_irq (ide_drive_t *drive)
drive->name, __FUNCTION__); drive->name, __FUNCTION__);
return 0; return 0;
} }
EXPORT_SYMBOL(__ide_dma_test_irq);
#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
int __ide_dma_bad_drive (ide_drive_t *drive) int __ide_dma_bad_drive (ide_drive_t *drive)
...@@ -784,7 +782,7 @@ EXPORT_SYMBOL(__ide_dma_timeout); ...@@ -784,7 +782,7 @@ EXPORT_SYMBOL(__ide_dma_timeout);
/* /*
* Needed for allowing full modular support of ide-driver * Needed for allowing full modular support of ide-driver
*/ */
int ide_release_dma_engine (ide_hwif_t *hwif) static int ide_release_dma_engine(ide_hwif_t *hwif)
{ {
if (hwif->dmatable_cpu) { if (hwif->dmatable_cpu) {
pci_free_consistent(hwif->pci_dev, pci_free_consistent(hwif->pci_dev,
...@@ -796,7 +794,7 @@ int ide_release_dma_engine (ide_hwif_t *hwif) ...@@ -796,7 +794,7 @@ int ide_release_dma_engine (ide_hwif_t *hwif)
return 1; return 1;
} }
int ide_release_iomio_dma (ide_hwif_t *hwif) static int ide_release_iomio_dma(ide_hwif_t *hwif)
{ {
if ((hwif->dma_extra) && (hwif->channel == 0)) if ((hwif->dma_extra) && (hwif->channel == 0))
release_region((hwif->dma_base + 16), hwif->dma_extra); release_region((hwif->dma_base + 16), hwif->dma_extra);
...@@ -820,7 +818,7 @@ int ide_release_dma (ide_hwif_t *hwif) ...@@ -820,7 +818,7 @@ int ide_release_dma (ide_hwif_t *hwif)
return ide_release_iomio_dma(hwif); return ide_release_iomio_dma(hwif);
} }
int ide_allocate_dma_engine (ide_hwif_t *hwif) static int ide_allocate_dma_engine(ide_hwif_t *hwif)
{ {
hwif->dmatable_cpu = pci_alloc_consistent(hwif->pci_dev, hwif->dmatable_cpu = pci_alloc_consistent(hwif->pci_dev,
PRD_ENTRIES * PRD_BYTES, PRD_ENTRIES * PRD_BYTES,
...@@ -837,7 +835,7 @@ int ide_allocate_dma_engine (ide_hwif_t *hwif) ...@@ -837,7 +835,7 @@ int ide_allocate_dma_engine (ide_hwif_t *hwif)
return 1; return 1;
} }
int ide_mapped_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports) static int ide_mapped_mmio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int ports)
{ {
printk(KERN_INFO " %s: MMIO-DMA ", hwif->name); printk(KERN_INFO " %s: MMIO-DMA ", hwif->name);
...@@ -852,7 +850,7 @@ int ide_mapped_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int port ...@@ -852,7 +850,7 @@ int ide_mapped_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int port
return 0; return 0;
} }
int ide_iomio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports) static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int ports)
{ {
printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx", printk(KERN_INFO " %s: BM-DMA at 0x%04lx-0x%04lx",
hwif->name, base, base + ports - 1); hwif->name, base, base + ports - 1);
...@@ -881,10 +879,7 @@ int ide_iomio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports) ...@@ -881,10 +879,7 @@ int ide_iomio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
return 0; return 0;
} }
/* static int ide_dma_iobase(ide_hwif_t *hwif, unsigned long base, unsigned int ports)
*
*/
int ide_dma_iobase (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
{ {
if (hwif->mmio == 2) if (hwif->mmio == 2)
return ide_mapped_mmio_dma(hwif, base,ports); return ide_mapped_mmio_dma(hwif, base,ports);
......
...@@ -228,7 +228,7 @@ void QUIRK_LIST (ide_drive_t *drive) ...@@ -228,7 +228,7 @@ void QUIRK_LIST (ide_drive_t *drive)
* of the sector count register location, with interrupts disabled * of the sector count register location, with interrupts disabled
* to ensure that the reads all happen together. * to ensure that the reads all happen together.
*/ */
void ata_vlb_sync (ide_drive_t *drive, unsigned long port) static void ata_vlb_sync(ide_drive_t *drive, unsigned long port)
{ {
(void) HWIF(drive)->INB(port); (void) HWIF(drive)->INB(port);
(void) HWIF(drive)->INB(port); (void) HWIF(drive)->INB(port);
...@@ -238,7 +238,7 @@ void ata_vlb_sync (ide_drive_t *drive, unsigned long port) ...@@ -238,7 +238,7 @@ void ata_vlb_sync (ide_drive_t *drive, unsigned long port)
/* /*
* This is used for most PIO data transfers *from* the IDE interface * This is used for most PIO data transfers *from* the IDE interface
*/ */
void ata_input_data (ide_drive_t *drive, void *buffer, u32 wcount) static void ata_input_data(ide_drive_t *drive, void *buffer, u32 wcount)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
u8 io_32bit = drive->io_32bit; u8 io_32bit = drive->io_32bit;
...@@ -260,7 +260,7 @@ void ata_input_data (ide_drive_t *drive, void *buffer, u32 wcount) ...@@ -260,7 +260,7 @@ void ata_input_data (ide_drive_t *drive, void *buffer, u32 wcount)
/* /*
* This is used for most PIO data transfers *to* the IDE interface * This is used for most PIO data transfers *to* the IDE interface
*/ */
void ata_output_data (ide_drive_t *drive, void *buffer, u32 wcount) static void ata_output_data(ide_drive_t *drive, void *buffer, u32 wcount)
{ {
ide_hwif_t *hwif = HWIF(drive); ide_hwif_t *hwif = HWIF(drive);
u8 io_32bit = drive->io_32bit; u8 io_32bit = drive->io_32bit;
...@@ -1107,7 +1107,7 @@ static void check_dma_crc(ide_drive_t *drive) ...@@ -1107,7 +1107,7 @@ static void check_dma_crc(ide_drive_t *drive)
#endif #endif
} }
void pre_reset (ide_drive_t *drive) static void pre_reset(ide_drive_t *drive)
{ {
DRIVER(drive)->pre_reset(drive); DRIVER(drive)->pre_reset(drive);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <linux/ide.h> #include <linux/ide.h>
/* Add your devices here :)) */ /* Add your devices here :)) */
struct pnp_device_id idepnp_devices[] = { static struct pnp_device_id idepnp_devices[] = {
/* Generic ESDI/IDE/ATA compatible hard disk controller */ /* Generic ESDI/IDE/ATA compatible hard disk controller */
{.id = "PNP0600", .driver_data = 0}, {.id = "PNP0600", .driver_data = 0},
{.id = ""} {.id = ""}
......
...@@ -333,7 +333,7 @@ static void __init init_ide_data (void) ...@@ -333,7 +333,7 @@ static void __init init_ide_data (void)
* Returns a guessed speed in MHz. * Returns a guessed speed in MHz.
*/ */
int ide_system_bus_speed (void) static int ide_system_bus_speed(void)
{ {
static struct pci_device_id pci_default[] = { static struct pci_device_id pci_default[] = {
{ PCI_DEVICE(PCI_ANY_ID, PCI_ANY_ID) }, { PCI_DEVICE(PCI_ANY_ID, PCI_ANY_ID) },
...@@ -414,7 +414,7 @@ struct seq_operations ide_drivers_op = { ...@@ -414,7 +414,7 @@ struct seq_operations ide_drivers_op = {
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_ide_root; struct proc_dir_entry *proc_ide_root;
ide_proc_entry_t generic_subdriver_entries[] = { static ide_proc_entry_t generic_subdriver_entries[] = {
{ "capacity", S_IFREG|S_IRUGO, proc_ide_read_capacity, NULL }, { "capacity", S_IFREG|S_IRUGO, proc_ide_read_capacity, NULL },
{ NULL, 0, NULL, NULL } { NULL, 0, NULL, NULL }
}; };
...@@ -1675,7 +1675,7 @@ static int __initdata is_chipset_set[MAX_HWIFS]; ...@@ -1675,7 +1675,7 @@ static int __initdata is_chipset_set[MAX_HWIFS];
* *
* Remember to update Documentation/ide.txt if you change something here. * Remember to update Documentation/ide.txt if you change something here.
*/ */
int __init ide_setup (char *s) static int __init ide_setup(char *s)
{ {
int i, vals[3]; int i, vals[3];
ide_hwif_t *hwif; ide_hwif_t *hwif;
...@@ -2261,7 +2261,7 @@ struct bus_type ide_bus_type = { ...@@ -2261,7 +2261,7 @@ struct bus_type ide_bus_type = {
/* /*
* This is gets invoked once during initialization, to set *everything* up * This is gets invoked once during initialization, to set *everything* up
*/ */
int __init ide_init (void) static int __init ide_init(void)
{ {
printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n"); printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n");
devfs_mk_dir("ide"); devfs_mk_dir("ide");
...@@ -2308,7 +2308,7 @@ int __init ide_init (void) ...@@ -2308,7 +2308,7 @@ int __init ide_init (void)
} }
#ifdef MODULE #ifdef MODULE
char *options = NULL; static char *options = NULL;
module_param(options, charp, 0); module_param(options, charp, 0);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -209,7 +209,7 @@ static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq ...@@ -209,7 +209,7 @@ static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq
#define CS_CHECK(fn, ret) \ #define CS_CHECK(fn, ret) \
do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
void ide_config(dev_link_t *link) static void ide_config(dev_link_t *link)
{ {
client_handle_t handle = link->handle; client_handle_t handle = link->handle;
ide_info_t *info = link->priv; ide_info_t *info = link->priv;
......
...@@ -1293,9 +1293,6 @@ extern void SELECT_INTERRUPT(ide_drive_t *); ...@@ -1293,9 +1293,6 @@ extern void SELECT_INTERRUPT(ide_drive_t *);
extern void SELECT_MASK(ide_drive_t *, int); extern void SELECT_MASK(ide_drive_t *, int);
extern void QUIRK_LIST(ide_drive_t *); extern void QUIRK_LIST(ide_drive_t *);
extern void ata_input_data(ide_drive_t *, void *, u32);
extern void ata_output_data(ide_drive_t *, void *, u32);
extern int drive_is_ready(ide_drive_t *); extern int drive_is_ready(ide_drive_t *);
extern int wait_for_ready(ide_drive_t *, int /* timeout */); extern int wait_for_ready(ide_drive_t *, int /* timeout */);
...@@ -1334,14 +1331,6 @@ extern int taskfile_lib_get_identify(ide_drive_t *drive, u8 *); ...@@ -1334,14 +1331,6 @@ extern int taskfile_lib_get_identify(ide_drive_t *drive, u8 *);
extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout); extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout);
ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, sector_t block); ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, sector_t block);
/*
* ide_system_bus_speed() returns what we think is the system VESA/PCI
* bus speed (in MHz). This is used for calculating interface PIO timings.
* The default is 40 for known PCI systems, 50 otherwise.
* The "idebus=xx" parameter can be used to override this value.
*/
extern int ide_system_bus_speed(void);
/* /*
* ide_stall_queue() can be used by a drive to give excess bandwidth back * ide_stall_queue() can be used by a drive to give excess bandwidth back
* to the hwgroup by sleeping for timeout jiffies. * to the hwgroup by sleeping for timeout jiffies.
...@@ -1355,7 +1344,6 @@ extern void do_ide_request(request_queue_t *); ...@@ -1355,7 +1344,6 @@ extern void do_ide_request(request_queue_t *);
extern void ide_init_subdrivers(void); extern void ide_init_subdrivers(void);
extern struct block_device_operations ide_fops[]; extern struct block_device_operations ide_fops[];
extern ide_proc_entry_t generic_subdriver_entries[];
extern int ata_attach(ide_drive_t *); extern int ata_attach(ide_drive_t *);
...@@ -1452,7 +1440,6 @@ extern int __ide_dma_check(ide_drive_t *); ...@@ -1452,7 +1440,6 @@ extern int __ide_dma_check(ide_drive_t *);
extern int ide_dma_setup(ide_drive_t *); extern int ide_dma_setup(ide_drive_t *);
extern void ide_dma_start(ide_drive_t *); extern void ide_dma_start(ide_drive_t *);
extern int __ide_dma_end(ide_drive_t *); extern int __ide_dma_end(ide_drive_t *);
extern int __ide_dma_test_irq(ide_drive_t *);
extern int __ide_dma_lostirq(ide_drive_t *); extern int __ide_dma_lostirq(ide_drive_t *);
extern int __ide_dma_timeout(ide_drive_t *); extern int __ide_dma_timeout(ide_drive_t *);
#endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */
......
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