Skip to content

Commit

Permalink
mtd: provide of_mtd_parse_partitions for !CONFIG_MTD_OF_PARTS
Browse files Browse the repository at this point in the history
If we don't have OpenFirmware enabled then provide a stub
of_mtd_parse_partitions that returns no partitions so drivers don't need
ifdeffery inside.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent f5671ab commit 11b73c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/linux/mtd/partitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,18 @@ extern int parse_mtd_partitions(struct mtd_info *master, const char **types,
struct device;
struct device_node;

#ifdef CONFIG_MTD_OF_PARTS
int __devinit of_mtd_parse_partitions(struct device *dev,
struct device_node *node,
struct mtd_partition **pparts);
#else
static inline int of_mtd_parse_partitions(struct device *dev,
struct device_node *node,
struct mtd_partition **pparts)
{
return 0;
}
#endif

#ifdef CONFIG_MTD_PARTITIONS
static inline int mtd_has_partitions(void) { return 1; }
Expand Down

0 comments on commit 11b73c8

Please sign in to comment.