diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2010-07-20 22:09:00 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:52:31 -0400 |
commit | 3b06c21e8462b77186613e70db286cfa8616088b (patch) | |
tree | 04884723e559da077a0eb83dfec3259212885bc8 /drivers/block | |
parent | ad96a7a7ea950d5bc9755f2f568be185c7070f1e (diff) |
floppy: make controller const
The struct cont_t is just a set of virtual function pointers.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/floppy.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 3126d5122b2b..cf04c1b234ed 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -538,7 +538,7 @@ static int max_buffer_sectors; | |||
538 | 538 | ||
539 | static int *errors; | 539 | static int *errors; |
540 | typedef void (*done_f)(int); | 540 | typedef void (*done_f)(int); |
541 | static struct cont_t { | 541 | static const struct cont_t { |
542 | void (*interrupt)(void); | 542 | void (*interrupt)(void); |
543 | /* this is called after the interrupt of the | 543 | /* this is called after the interrupt of the |
544 | * main command */ | 544 | * main command */ |
@@ -1970,14 +1970,14 @@ static void do_wakeup(void) | |||
1970 | wake_up(&command_done); | 1970 | wake_up(&command_done); |
1971 | } | 1971 | } |
1972 | 1972 | ||
1973 | static struct cont_t wakeup_cont = { | 1973 | static const struct cont_t wakeup_cont = { |
1974 | .interrupt = empty, | 1974 | .interrupt = empty, |
1975 | .redo = do_wakeup, | 1975 | .redo = do_wakeup, |
1976 | .error = empty, | 1976 | .error = empty, |
1977 | .done = (done_f)empty | 1977 | .done = (done_f)empty |
1978 | }; | 1978 | }; |
1979 | 1979 | ||
1980 | static struct cont_t intr_cont = { | 1980 | static const struct cont_t intr_cont = { |
1981 | .interrupt = empty, | 1981 | .interrupt = empty, |
1982 | .redo = process_fd_request, | 1982 | .redo = process_fd_request, |
1983 | .error = empty, | 1983 | .error = empty, |
@@ -2183,7 +2183,7 @@ static void redo_format(void) | |||
2183 | debugt(__func__, "queue format request"); | 2183 | debugt(__func__, "queue format request"); |
2184 | } | 2184 | } |
2185 | 2185 | ||
2186 | static struct cont_t format_cont = { | 2186 | static const struct cont_t format_cont = { |
2187 | .interrupt = format_interrupt, | 2187 | .interrupt = format_interrupt, |
2188 | .redo = redo_format, | 2188 | .redo = redo_format, |
2189 | .error = bad_flp_intr, | 2189 | .error = bad_flp_intr, |
@@ -2879,7 +2879,7 @@ do_request: | |||
2879 | return; | 2879 | return; |
2880 | } | 2880 | } |
2881 | 2881 | ||
2882 | static struct cont_t rw_cont = { | 2882 | static const struct cont_t rw_cont = { |
2883 | .interrupt = rw_interrupt, | 2883 | .interrupt = rw_interrupt, |
2884 | .redo = redo_fd_request, | 2884 | .redo = redo_fd_request, |
2885 | .error = bad_flp_intr, | 2885 | .error = bad_flp_intr, |
@@ -2915,7 +2915,7 @@ static void do_fd_request(struct request_queue *q) | |||
2915 | is_alive(__func__, ""); | 2915 | is_alive(__func__, ""); |
2916 | } | 2916 | } |
2917 | 2917 | ||
2918 | static struct cont_t poll_cont = { | 2918 | static const struct cont_t poll_cont = { |
2919 | .interrupt = success_and_wakeup, | 2919 | .interrupt = success_and_wakeup, |
2920 | .redo = floppy_ready, | 2920 | .redo = floppy_ready, |
2921 | .error = generic_failure, | 2921 | .error = generic_failure, |
@@ -2946,7 +2946,7 @@ static void reset_intr(void) | |||
2946 | pr_info("weird, reset interrupt called\n"); | 2946 | pr_info("weird, reset interrupt called\n"); |
2947 | } | 2947 | } |
2948 | 2948 | ||
2949 | static struct cont_t reset_cont = { | 2949 | static const struct cont_t reset_cont = { |
2950 | .interrupt = reset_intr, | 2950 | .interrupt = reset_intr, |
2951 | .redo = success_and_wakeup, | 2951 | .redo = success_and_wakeup, |
2952 | .error = generic_failure, | 2952 | .error = generic_failure, |
@@ -3051,7 +3051,7 @@ static void raw_cmd_done(int flag) | |||
3051 | generic_done(flag); | 3051 | generic_done(flag); |
3052 | } | 3052 | } |
3053 | 3053 | ||
3054 | static struct cont_t raw_cmd_cont = { | 3054 | static const struct cont_t raw_cmd_cont = { |
3055 | .interrupt = success_and_wakeup, | 3055 | .interrupt = success_and_wakeup, |
3056 | .redo = floppy_start, | 3056 | .redo = floppy_start, |
3057 | .error = generic_failure, | 3057 | .error = generic_failure, |