diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-03 14:42:36 -0400 |
---|---|---|
committer | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-23 06:24:03 -0400 |
commit | 813dcf7a6e642feb1ea566b96ce2912249d2b57d (patch) | |
tree | 80eb42f9c8d5673f35d9db8786dc251201e48d6f /arch/m68k/amiga/config.c | |
parent | b457d151613873ea035de0c7348abc3d4b6efd34 (diff) |
proc: move /proc/hardware to m68k-specific code
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Diffstat (limited to 'arch/m68k/amiga/config.c')
-rw-r--r-- | arch/m68k/amiga/config.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index 0a3f9e8ebde0..ab9862c3a136 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/seq_file.h> | ||
18 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
19 | #include <linux/console.h> | 20 | #include <linux/console.h> |
20 | #include <linux/rtc.h> | 21 | #include <linux/rtc.h> |
@@ -93,7 +94,7 @@ static char amiga_model_name[13] = "Amiga "; | |||
93 | 94 | ||
94 | static void amiga_sched_init(irq_handler_t handler); | 95 | static void amiga_sched_init(irq_handler_t handler); |
95 | static void amiga_get_model(char *model); | 96 | static void amiga_get_model(char *model); |
96 | static int amiga_get_hardware_list(char *buffer); | 97 | static void amiga_get_hardware_list(struct seq_file *m); |
97 | /* amiga specific timer functions */ | 98 | /* amiga specific timer functions */ |
98 | static unsigned long amiga_gettimeoffset(void); | 99 | static unsigned long amiga_gettimeoffset(void); |
99 | static int a3000_hwclk(int, struct rtc_time *); | 100 | static int a3000_hwclk(int, struct rtc_time *); |
@@ -911,13 +912,11 @@ static void amiga_get_model(char *model) | |||
911 | } | 912 | } |
912 | 913 | ||
913 | 914 | ||
914 | static int amiga_get_hardware_list(char *buffer) | 915 | static void amiga_get_hardware_list(struct seq_file *m) |
915 | { | 916 | { |
916 | int len = 0; | ||
917 | |||
918 | if (AMIGAHW_PRESENT(CHIP_RAM)) | 917 | if (AMIGAHW_PRESENT(CHIP_RAM)) |
919 | len += sprintf(buffer+len, "Chip RAM:\t%ldK\n", amiga_chip_size>>10); | 918 | seq_printf(m, "Chip RAM:\t%ldK\n", amiga_chip_size>>10); |
920 | len += sprintf(buffer+len, "PS Freq:\t%dHz\nEClock Freq:\t%ldHz\n", | 919 | seq_printf(m, "PS Freq:\t%dHz\nEClock Freq:\t%ldHz\n", |
921 | amiga_psfreq, amiga_eclock); | 920 | amiga_psfreq, amiga_eclock); |
922 | if (AMIGAHW_PRESENT(AMI_VIDEO)) { | 921 | if (AMIGAHW_PRESENT(AMI_VIDEO)) { |
923 | char *type; | 922 | char *type; |
@@ -935,14 +934,14 @@ static int amiga_get_hardware_list(char *buffer) | |||
935 | type = "Old or Unknown"; | 934 | type = "Old or Unknown"; |
936 | break; | 935 | break; |
937 | } | 936 | } |
938 | len += sprintf(buffer+len, "Graphics:\t%s\n", type); | 937 | seq_printf(m, "Graphics:\t%s\n", type); |
939 | } | 938 | } |
940 | 939 | ||
941 | #define AMIGAHW_ANNOUNCE(name, str) \ | 940 | #define AMIGAHW_ANNOUNCE(name, str) \ |
942 | if (AMIGAHW_PRESENT(name)) \ | 941 | if (AMIGAHW_PRESENT(name)) \ |
943 | len += sprintf (buffer+len, "\t%s\n", str) | 942 | seq_printf (m, "\t%s\n", str) |
944 | 943 | ||
945 | len += sprintf (buffer + len, "Detected hardware:\n"); | 944 | seq_printf (m, "Detected hardware:\n"); |
946 | 945 | ||
947 | AMIGAHW_ANNOUNCE(AMI_VIDEO, "Amiga Video"); | 946 | AMIGAHW_ANNOUNCE(AMI_VIDEO, "Amiga Video"); |
948 | AMIGAHW_ANNOUNCE(AMI_BLITTER, "Blitter"); | 947 | AMIGAHW_ANNOUNCE(AMI_BLITTER, "Blitter"); |
@@ -975,15 +974,13 @@ static int amiga_get_hardware_list(char *buffer) | |||
975 | AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot"); | 974 | AMIGAHW_ANNOUNCE(PCMCIA, "PCMCIA Slot"); |
976 | #ifdef CONFIG_ZORRO | 975 | #ifdef CONFIG_ZORRO |
977 | if (AMIGAHW_PRESENT(ZORRO)) | 976 | if (AMIGAHW_PRESENT(ZORRO)) |
978 | len += sprintf(buffer+len, "\tZorro II%s AutoConfig: %d Expansion " | 977 | seq_printf(m, "\tZorro II%s AutoConfig: %d Expansion " |
979 | "Device%s\n", | 978 | "Device%s\n", |
980 | AMIGAHW_PRESENT(ZORRO3) ? "I" : "", | 979 | AMIGAHW_PRESENT(ZORRO3) ? "I" : "", |
981 | zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s"); | 980 | zorro_num_autocon, zorro_num_autocon == 1 ? "" : "s"); |
982 | #endif /* CONFIG_ZORRO */ | 981 | #endif /* CONFIG_ZORRO */ |
983 | 982 | ||
984 | #undef AMIGAHW_ANNOUNCE | 983 | #undef AMIGAHW_ANNOUNCE |
985 | |||
986 | return len; | ||
987 | } | 984 | } |
988 | 985 | ||
989 | /* | 986 | /* |