summaryrefslogtreecommitdiff
path: root/sys/dev/flash
diff options
context:
space:
mode:
authoruebayasi <uebayasi@NetBSD.org>2011-03-30 14:34:26 +0000
committeruebayasi <uebayasi@NetBSD.org>2011-03-30 14:34:26 +0000
commitdff04819be1b85b0a41c6b5e9f5d1be49a7c3c1b (patch)
tree3a12af976d4eb18ef5d080cf41ccd571bb3a9e41 /sys/dev/flash
parentff5ee3987ff5191811a8e9a56e3437680bc64e66 (diff)
Whitespace.
Diffstat (limited to 'sys/dev/flash')
-rw-r--r--sys/dev/flash/flash.c5
-rw-r--r--sys/dev/flash/flash.h14
2 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/flash/flash.c b/sys/dev/flash/flash.c
index 33007cfe339..b2eb31b7b2d 100644
--- a/sys/dev/flash/flash.c
+++ b/sys/dev/flash/flash.c
@@ -1,4 +1,4 @@
-/* $NetBSD: flash.c,v 1.1 2011/02/26 18:07:30 ahoka Exp $ */
+/* $NetBSD: flash.c,v 1.2 2011/03/30 14:34:26 uebayasi Exp $ */
/*-
* Copyright (c) 2011 Department of Software Engineering,
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.1 2011/02/26 18:07:30 ahoka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.2 2011/03/30 14:34:26 uebayasi Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -487,6 +487,7 @@ flashioctl(dev_t dev, u_long command, void *data, int flags, struct lwp *l)
return err;
}
+
int
flashsize(dev_t dev)
{
diff --git a/sys/dev/flash/flash.h b/sys/dev/flash/flash.h
index ead0b3cda27..91065968c08 100644
--- a/sys/dev/flash/flash.h
+++ b/sys/dev/flash/flash.h
@@ -1,4 +1,4 @@
-/* $NetBSD: flash.h,v 1.1 2011/02/26 18:07:30 ahoka Exp $ */
+/* $NetBSD: flash.h,v 1.2 2011/03/30 14:34:26 uebayasi Exp $ */
/*-
* Copyright (c) 2011 Department of Software Engineering,
@@ -75,7 +75,7 @@ device_t flash_get_device(dev_t);
struct flash_erase_instruction {
flash_addr_t ei_addr;
flash_addr_t ei_len;
- void (*ei_callback) (struct flash_erase_instruction *);
+ void (*ei_callback)(struct flash_erase_instruction *);
u_long ei_priv;
u_char ei_state;
};
@@ -106,12 +106,12 @@ struct flash_partition {
* @block_isbad: checks if a block is bad on flash
*/
struct flash_interface {
- int (*erase) (device_t, struct flash_erase_instruction *);
- int (*read) (device_t, off_t, size_t, size_t *, uint8_t *);
- int (*write) (device_t, off_t, size_t, size_t *, const uint8_t *);
+ int (*erase)(device_t, struct flash_erase_instruction *);
+ int (*read)(device_t, off_t, size_t, size_t *, uint8_t *);
+ int (*write)(device_t, off_t, size_t, size_t *, const uint8_t *);
int (*block_markbad)(device_t, uint64_t);
int (*block_isbad)(device_t, uint64_t);
- int (*sync) (device_t);
+ int (*sync)(device_t);
int (*submit)(device_t, struct buf *);
@@ -159,7 +159,7 @@ check_pattern(const void *buf, uint8_t patt, size_t offset, size_t size)
{
size_t i;
for (i = offset; i < size; i++) {
- if (((const uint8_t *) buf)[i] != patt)
+ if (((const uint8_t *)buf)[i] != patt)
return 0;
}
return 1;