Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274966
b: refs/heads/master
c: 5f94913
h: refs/heads/master
v: v3
  • Loading branch information
Shaohui Xie authored and Artem Bityutskiy committed Oct 16, 2011
1 parent 8789522 commit f324dab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57468a646e513bd88aeaa322eee2a8a960df91fc
refs/heads/master: 5f949137952020214cd167093dd7be448f21c079
6 changes: 6 additions & 0 deletions trunk/drivers/mtd/devices/m25p80.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <linux/mtd/cfi.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/of_platform.h>

#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
Expand Down Expand Up @@ -823,6 +824,11 @@ static int __devinit m25p_probe(struct spi_device *spi)
unsigned i;
struct mtd_part_parser_data ppdata;

#ifdef CONFIG_MTD_OF_PARTS
if (!of_device_is_available(spi->dev.of_node))
return -ENODEV;
#endif

/* Platform data helps sort out which chip type we have, as
* well as how this board partitions it. If we don't have
* a chip ID, try the JEDEC id commands; they'll work for most
Expand Down

0 comments on commit f324dab

Please sign in to comment.