From: Art Haas <ahaas@airmail.net>
To: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] C99 initializers for drivers/mtd/devices
Date: Tue, 22 Apr 2003 14:25:29 -0500 [thread overview]
Message-ID: <20030422192529.GB17381@debian> (raw)
In-Reply-To: <20030422190324.GC12947@wohnheim.fh-wedel.de>
Here's a patch against the CVS lart.c to convert it to C99. The
'blkmtd.c' file from CVS doesn't match the file I generated the C99
patch for that was in the kernel.
Art Haas
Index: drivers/mtd/devices/lart.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/lart.c,v
retrieving revision 1.2
diff -u -u -r1.2 lart.c
--- drivers/mtd/devices/lart.c 2 Oct 2001 15:05:13 -0000 1.2
+++ drivers/mtd/devices/lart.c 22 Apr 2003 19:23:43 -0000
@@ -584,46 +584,41 @@
static struct mtd_info mtd;
-static struct mtd_erase_region_info erase_regions[] =
-{
- /* parameter blocks */
- {
- offset: 0x00000000,
- erasesize: FLASH_BLOCKSIZE_PARAM,
- numblocks: FLASH_NUMBLOCKS_16m_PARAM
- },
- /* main blocks */
- {
- offset: FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM,
- erasesize: FLASH_BLOCKSIZE_MAIN,
- numblocks: FLASH_NUMBLOCKS_16m_MAIN
- }
+static struct mtd_erase_region_info erase_regions[] = {
+ /* parameter blocks */
+ {
+ .offset = 0x00000000,
+ .erasesize = FLASH_BLOCKSIZE_PARAM,
+ .numblocks = FLASH_NUMBLOCKS_16m_PARAM,
+ },
+ /* main blocks */
+ {
+ .offset = FLASH_BLOCKSIZE_PARAM * FLASH_NUMBLOCKS_16m_PARAM,
+ .erasesize = FLASH_BLOCKSIZE_MAIN,
+ .numblocks = FLASH_NUMBLOCKS_16m_MAIN,
+ }
};
#ifdef HAVE_PARTITIONS
-static struct mtd_partition lart_partitions[] =
-{
- /* blob */
- {
- name: "blob",
- offset: BLOB_START,
- size: BLOB_LEN,
- mask_flags: 0
- },
- /* kernel */
- {
- name: "kernel",
- offset: KERNEL_START, /* MTDPART_OFS_APPEND */
- size: KERNEL_LEN,
- mask_flags: 0
- },
- /* initial ramdisk / file system */
- {
- name: "file system",
- offset: INITRD_START, /* MTDPART_OFS_APPEND */
- size: INITRD_LEN, /* MTDPART_SIZ_FULL */
- mask_flags: 0
- }
+static struct mtd_partition lart_partitions[] = {
+ /* blob */
+ {
+ .name = "blob",
+ .offset = BLOB_START,
+ .size = BLOB_LEN,
+ },
+ /* kernel */
+ {
+ .name = "kernel",
+ .offset = KERNEL_START, /* MTDPART_OFS_APPEND */
+ .size = KERNEL_LEN,
+ },
+ /* initial ramdisk / file system */
+ {
+ .name = "file system",
+ .offset = INITRD_START, /* MTDPART_OFS_APPEND */
+ .size = INITRD_LEN, /* MTDPART_SIZ_FULL */
+ }
};
#endif
--
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt, Kansas City Star, 1918
next prev parent reply other threads:[~2003-04-22 19:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-22 15:56 [PATCH] C99 initializers for drivers/mtd/devices Art Haas
2003-04-22 19:03 ` Jörn Engel
2003-04-22 19:18 ` Art Haas
2003-04-22 19:25 ` Art Haas [this message]
2003-04-22 20:13 ` Jörn Engel
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=20030422192529.GB17381@debian \
--to=ahaas@airmail.net \
--cc=linux-mtd@lists.infradead.org \
/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