26 Feb, 2010
4 commits
-
The parenthesis was misplaced, upon error a one was shown.
[dwmw2: Fix the code not to do the assignment within the if() statement]
Signed-off-by: Roel Kluin
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
Otherwise we may hang if we are called from panic() through mtdoops.
Signed-off-by: Aaro Koskinen
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
Add nand lock / unlock routines. At least 'micron' parts
support this.Signed-off-by: Vimal Singh
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
... verification for 'nand_erase_nand'
These checks are expected to be used by 'nand_lock' and 'nand_unlock'
routines too. As all these three are block aligned operations.
So, creating a helper function for this makes sense.Signed-off-by: Vimal Singh
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse
25 Feb, 2010
23 commits
-
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14995
Reported-by: R. Diez
Signed-off-by: Andrew Morton
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
When machine_is_ceiva() returns zero, 'clps_setup_flash()' returns a
value of an unitialized variable. Fix this.Spotted by David Binderman.
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
register_chrdev() registers minor numbers up to 255, but we can now
potentially have much larger numbers.Signed-off-by: Ben Hutchings
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
add_mtd_blktrans_dev() imposes a maximum of 257 devices per block
translator. This was presumably meant to prevent overflow back in the
days of 8-bit minor numbers. Instead, check against MINORMASK and the
limits of the partition naming scheme.Signed-off-by: Ben Hutchings
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
Signed-off-by: Ben Hutchings
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
idr_get_next() was accidentally not exported when added. It is about
to be used by mtdcore, which may be built as a module.Signed-off-by: Ben Hutchings
Acked-by: KAMEZAWA Hiroyuki
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
Since we allocate struct mtd_blktrans_dev for each block device, we
can add our own structure members to the end. Therefore embed
struct mtd_blktrans_dev in struct mtdblk_dev and remove the static
array of struct mtdblk_dev. Also remove the redundant pointer to
struct mtd_info.This is preparation for removing the static limit on the number of MTD
devices.Signed-off-by: Ben Hutchings
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
MAX_MTD_DEVICES is about to be removed.
Signed-off-by: Ben Hutchings
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
MAX_MTD_DEVICES is about to be removed.
Signed-off-by: Ben Hutchings
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
This removes the need to know the number of MTD devices.
Signed-off-by: Ben Hutchings
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
Signed-off-by: Ben Hutchings
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
Signed-off-by: Roel Kluin
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
There are new Blackfin MMR helper functions that use the same name as some
of the local functions in this driver, so have the driver use more specific
names to avoid the issue.Signed-off-by: Mike Frysinger
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
In mtd_ioctl MEMGETREGIONINFO the region_user_info pointer ur
is cast in __kernel space. This produces a number of sparse warnings
like:warning: cast removes address space of expression
warning: incorrect type in initializer (different address spaces)
expected unsigned int const [noderef] *register __p
got unsigned int *Since argp is already a void __user * just use it dirrectly without
the cast and make ur a __user *.Signed-off-by: H Hartley Sweeten
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
In the inline function cfi_build_cmd_addr, the cast of cmd_ofs to an
uint8_t produces a sparse warning of the type:warning: cast truncates bits from constant value (2aa becomes aa)
Quiet the warning by masking cmd_ofs with 0xff and remove the cast.
Signed-off-by: H Hartley Sweeten
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
Fix handling of reads that don't start on a half-word boundary.
Signed-off-by: Jon Ringle
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
The clock must already be off after mtd->suspend. Disabling it again
results in an negative overflow of the clock usage count. This didn't
hurt as mxcnd_resume undid it after wake up.Signed-off-by: Uwe Kleine-König
Acked-by: Sascha Hauer
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
The probe function calls platform_set_drvdata with a valid pointer when
the probe is successful. As mxcnd_suspend and mxcnd_resume are only
called on bound devices, platform_get_drvdata always returns non-NULL.This fix isn't critical as the pointer is always valid so it doesn't
matter if the compiler generated code for it or not.Signed-off-by: Uwe Kleine-König
Reported-by: David Binderman
Signed-off-by: Artem Bityutskiy
Acked-by: Sascha Hauer
Signed-off-by: David Woodhouse -
In cfi_intelext_setup and cfi_amdstd_setup, mtd is never NULL.
Remove unnecessary checks.Signed-off-by: Jiri Slaby
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
The match_table field of the struct of_device_id is constant in
so it is worth to make xps2_of_match also constant.The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)//
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
//Signed-off-by: Márton Németh
Cc: Julia Lawall
Cc: cocci@diku.dk
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
The id_table field of the struct usb_device_id is constant in
so it is worth to make alauda_table also constant.The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)//
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
//Signed-off-by: Márton Németh
Cc: Julia Lawall
Cc: cocci@diku.dk
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
The id_table field of the struct pci_driver is constant in
so it is worth to make cafe_nand_tbl also constant.The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)//
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
//Signed-off-by: Márton Németh
Cc: Julia Lawall
Cc: cocci@diku.dk
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse -
s/nanodeconds/nanoseconds
Signed-off-by: Andrey Yurovsky
Signed-off-by: Artem Bityutskiy
Signed-off-by: David Woodhouse
11 Feb, 2010
1 commit
-
Commit e99030609e27abff7e1a868cb56384c678b09984 ("mtd: orion_nand.c: add
error handling and use resource_size()") introduced a build error -- it
assigns something to a undeclared variable 'err', whereas the rest of
the code uses 'ret' for this task.This patch fixes this typo and thus removes the build failure.
Signed-off-by: Peter Huewe
Reviewed-by: H Hartley Sweeten
Acked-by: Uwe Kleine-König
Signed-off-by: David Woodhouse
Signed-off-by: Andrew Morton
06 Jan, 2010
2 commits
-
The ts72xx platform has been updated to use the generic platform nand
driver (plat_nand.c). This removes the now-defunct ts7250.c nand driver.Signed-off-by: H Hartley Sweeten
Cc: Matthieu Crapet
Cc: Jesse Off
Signed-off-by: David Woodhouse -
Update the ts72xx platform's nand driver support.
This changes the ts72xx platform from using a custom nand driver
(ts7250.c) to the generic platform nand driver (plat_nand.c).Tested on TS-7250 with 32MiB NAND.
Signed-off-by: H Hartley Sweeten
Tested-by: Matthieu Crapet
Cc: Jesse Off
Signed-off-by: David Woodhouse
02 Jan, 2010
2 commits
-
ioremap() returns a void __iomem * not an unsigned long. Update the
Documentation file to reflect this.Signed-off-by: H Hartley Sweeten
Signed-off-by: Randy Dunlap
Signed-off-by: David Woodhouse -
mtd_list has type struct mtd_info **, not struct mtd_info *, so the
elements of the array should have pointer type, not structure type.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@disable sizeof_type_expr@
type T;
T **x;
@@x =
//Signed-off-by: Julia Lawall
Signed-off-by: David Woodhouse
01 Jan, 2010
8 commits
-
Signed-off-by: David Woodhouse
-
Due to I have renamed the platform_device.name,so this patch changes
this nand driver platform_driver name.Signed-off-by: Wan ZongShun
Signed-off-by: David Woodhouse -
Use resource_size().
Signed-off-by: H Hartley Sweeten
Acked-by: Yoshihiro Shimoda
Signed-off-by: David Woodhouse -
Remove unnecessary casts and use dev_get_platdata() to retrieve the
struct mfd_cell data from the platform.Use resource_size() for the ioremap()'s.
Signed-off-by: H Hartley Sweeten
Signed-off-by: David Woodhouse -
Use resource_size().
Signed-off-by: H Hartley Sweeten
Cc: Ben Dooks
Signed-off-by: David Woodhouse -
Use platform_get_resource() to fetch the memory resource and
add error handling for when it is missing. Use resource_size()
for the ioremap().Signed-off-by: H Hartley Sweeten
Signed-off-by: David Woodhouse -
Use resource_size().
Signed-off-by: H Hartley Sweeten
Signed-off-by: David Woodhouse -
Use resource_size().
Signed-off-by: H Hartley Sweeten
Signed-off-by: David Woodhouse