Skip to content

Commit

Permalink
mmc: fix compile error when CONFIG_BLOCK is not enabled
Browse files Browse the repository at this point in the history
'DISK_NAME_LEN' is undeclared when CONFIG_BLOCK is disabled; its use was
introduced via genhd.h by the general purpose partition patch.

To fix, we just add our own MAX_MMC_PART_NAME_LEN macro instead of using
DISK_NAME_LEN.

Reported-by: Randy Dunlap <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Acked-by: Andrei Warkentin <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
  • Loading branch information
namjaejeon authored and cjb committed Oct 27, 2011
1 parent 336c716 commit a6029e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/mmc/card.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include <linux/mmc/core.h>
#include <linux/mod_devicetable.h>
#include <linux/genhd.h>

struct mmc_cid {
unsigned int manfid;
Expand Down Expand Up @@ -175,14 +174,15 @@ struct sdio_func_tuple;
#define MMC_NUM_BOOT_PARTITION 2
#define MMC_NUM_GP_PARTITION 4
#define MMC_NUM_PHY_PARTITION 6
#define MAX_MMC_PART_NAME_LEN 20

/*
* MMC Physical partitions
*/
struct mmc_part {
unsigned int size; /* partition size (in bytes) */
unsigned int part_cfg; /* partition type */
char name[DISK_NAME_LEN];
char name[MAX_MMC_PART_NAME_LEN];
bool force_ro; /* to make boot parts RO by default */
};

Expand Down

0 comments on commit a6029e1

Please sign in to comment.