aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:28 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:28 -0400
commitaf007ec6c9467c2a26f5f684cee52efa497280c4 (patch)
tree5f171cbe55497e6fdc1a2880d5a20f38af3acccb /drivers
parente3bfae4c105c9b79a539bb868e8541d2ad38deee (diff)
ide-pmac: remove dead code
Remove unused pmac_ide_{check_base,get_irq}() and pmac_find_ide_boot(), then remove no longer needed ide_majors[] and pmac_ide_count. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ppc/pmac.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 03a77713caf2..763bc5596c9e 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -80,7 +80,6 @@ typedef struct pmac_ide_hwif {
80} pmac_ide_hwif_t; 80} pmac_ide_hwif_t;
81 81
82static pmac_ide_hwif_t pmac_ide[MAX_HWIFS]; 82static pmac_ide_hwif_t pmac_ide[MAX_HWIFS];
83static int pmac_ide_count;
84 83
85enum { 84enum {
86 controller_ohare, /* OHare based */ 85 controller_ohare, /* OHare based */
@@ -893,52 +892,6 @@ pmac_ide_get_base(int index)
893 return pmac_ide[index].regbase; 892 return pmac_ide[index].regbase;
894} 893}
895 894
896int
897pmac_ide_check_base(unsigned long base)
898{
899 int ix;
900
901 for (ix = 0; ix < MAX_HWIFS; ++ix)
902 if (base == pmac_ide[ix].regbase)
903 return ix;
904 return -1;
905}
906
907int
908pmac_ide_get_irq(unsigned long base)
909{
910 int ix;
911
912 for (ix = 0; ix < MAX_HWIFS; ++ix)
913 if (base == pmac_ide[ix].regbase)
914 return pmac_ide[ix].irq;
915 return 0;
916}
917
918static int ide_majors[] = { 3, 22, 33, 34, 56, 57 };
919
920dev_t __init
921pmac_find_ide_boot(char *bootdevice, int n)
922{
923 int i;
924
925 /*
926 * Look through the list of IDE interfaces for this one.
927 */
928 for (i = 0; i < pmac_ide_count; ++i) {
929 char *name;
930 if (!pmac_ide[i].node || !pmac_ide[i].node->full_name)
931 continue;
932 name = pmac_ide[i].node->full_name;
933 if (memcmp(name, bootdevice, n) == 0 && name[n] == 0) {
934 /* XXX should cope with the 2nd drive as well... */
935 return MKDEV(ide_majors[i], 0);
936 }
937 }
938
939 return 0;
940}
941
942/* Suspend call back, should be called after the child devices 895/* Suspend call back, should be called after the child devices
943 * have actually been suspended 896 * have actually been suspended
944 */ 897 */