From: "Randy.Dunlap" <rddunlap@osdl.org>
To: akpm <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, zwane@linuxpower.ca
Subject: [PATCH] floppy98.c: use C99 struct initializers
Date: Sun, 18 Apr 2004 19:51:35 -0700 [thread overview]
Message-ID: <20040418195135.5dedf652.rddunlap@osdl.org> (raw)
In-Reply-To: <20040418194813.629e75bd.randy.dunlap@verizon.net>
Convert (most of) floppy98.c to use C99 struct initializers,
like floppy.c.
diffstat:=
drivers/block/floppy98.c | 60 +++++++++++++++++++++++------------------------
1 files changed, 30 insertions(+), 30 deletions(-)
diff -Naurp ./drivers/block/floppy98.c~fd98_c99 ./drivers/block/floppy98.c
--- ./drivers/block/floppy98.c~fd98_c99 2004-04-18 18:12:10.000000000 -0700
+++ ./drivers/block/floppy98.c 2004-04-18 19:20:18.000000000 -0700
@@ -907,9 +907,9 @@ static void motor_off_callback(unsigned
}
static struct timer_list motor_off_timer[N_FDC] = {
- {data: 0, function: motor_off_callback},
+ {.data = 0, .function = motor_off_callback},
#if N_FDC > 1
- {data: 1, function: motor_off_callback},
+ {.data = 1, .function = motor_off_callback},
#endif
#if N_FDC > 2
# error "N_FDC > 2; please fix initializer for motor_off_timer[]"
@@ -2071,17 +2071,17 @@ static void do_wakeup(void)
}
static struct cont_t wakeup_cont = {
- empty,
- do_wakeup,
- empty,
- (done_f) empty
+ .interrupt = empty,
+ .redo = do_wakeup,
+ .error = empty,
+ .done = (done_f) empty
};
static struct cont_t intr_cont = {
- empty,
- process_fd_request,
- empty,
- (done_f) empty
+ .interrupt = empty,
+ .redo = process_fd_request,
+ .error = empty,
+ .done = (done_f) empty
};
static int wait_til_done(void (*handler) (void), int interruptible)
@@ -2303,10 +2303,10 @@ static void redo_format(void)
}
static struct cont_t format_cont = {
- format_interrupt,
- redo_format,
- bad_flp_intr,
- generic_done
+ .interrupt = format_interrupt,
+ .redo = redo_format,
+ .error = bad_flp_intr,
+ .done = generic_done
};
static int do_format(int drive, struct format_descr *tmp_format_req)
@@ -3026,10 +3026,10 @@ static void redo_fd_request(void)
}
static struct cont_t rw_cont = {
- rw_interrupt,
- redo_fd_request,
- bad_flp_intr,
- request_done
+ .interrupt = rw_interrupt,
+ .redo = redo_fd_request,
+ .error = bad_flp_intr,
+ .done = request_done
};
static void process_fd_request(void)
@@ -3064,10 +3064,10 @@ static void do_fd_request(request_queue_
}
static struct cont_t poll_cont = {
- success_and_wakeup,
- floppy_ready,
- generic_failure,
- generic_done
+ .interrupt = success_and_wakeup,
+ .redo = floppy_ready,
+ .error = generic_failure,
+ .done = generic_done
};
static int poll_drive(int interruptible, int flag)
@@ -3100,10 +3100,10 @@ static void reset_intr(void)
}
static struct cont_t reset_cont = {
- reset_intr,
- success_and_wakeup,
- generic_failure,
- generic_done
+ .interrupt = reset_intr,
+ .redo = success_and_wakeup,
+ .error = generic_failure,
+ .done = generic_done
};
static int user_reset_fdc(int drive, int arg, int interruptible)
@@ -3207,10 +3207,10 @@ static void raw_cmd_done(int flag)
}
static struct cont_t raw_cmd_cont = {
- success_and_wakeup,
- floppy_start,
- generic_failure,
- raw_cmd_done
+ .interrupt = success_and_wakeup,
+ .redo = floppy_start,
+ .error = generic_failure,
+ .done = raw_cmd_done
};
static inline int raw_cmd_copyout(int cmd, char *param,
prev parent reply other threads:[~2004-04-19 2:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040418194357.4cd02a06.rddunlap@osdl.org>
2004-04-19 2:51 ` [PATCH] floppy98.c: use kernel min/max Randy.Dunlap
2004-04-19 12:14 ` Bartlomiej Zolnierkiewicz
2004-04-19 15:51 ` Randy.Dunlap
2004-04-19 16:59 ` Bartlomiej Zolnierkiewicz
2004-04-19 17:05 ` Christoph Hellwig
2004-04-19 18:05 ` Randy.Dunlap
2004-04-19 19:06 ` Bartlomiej Zolnierkiewicz
2004-04-19 17:09 ` Randy.Dunlap
[not found] ` <20040418194813.629e75bd.randy.dunlap@verizon.net>
2004-04-19 2:51 ` Randy.Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040418195135.5dedf652.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@linuxpower.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®