Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be76c5fb authored by Joern Engel's avatar Joern Engel Committed by Thomas Gleixner
Browse files

[MTD] Fix commandline parser alignement



Add alignment to cmdline.

From: "Timofei V. Bondarenko" <tim@ipi.ac.ru>
Signed-off-by: default avatarJoern Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 02b15e34
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
/*
/*
 * $Id: cmdlinepart.c,v 1.17 2004/11/26 11:18:47 lavinen Exp $
 * $Id: cmdlinepart.c,v 1.18 2005/06/07 15:04:26 joern Exp $
 *
 *
 * Read flash partition table from command line
 * Read flash partition table from command line
 *
 *
@@ -239,7 +239,8 @@ static int mtdpart_setup_real(char *s)
				&num_parts,	/* out: number of parts */
				&num_parts,	/* out: number of parts */
				0,		/* first partition */
				0,		/* first partition */
				(unsigned char**)&this_mtd, /* out: extra mem */
				(unsigned char**)&this_mtd, /* out: extra mem */
				mtd_id_len + 1 + sizeof(*this_mtd));
				mtd_id_len + 1 + sizeof(*this_mtd) + 
				sizeof(void*)-1 /*alignment*/);
		if(!parts)
		if(!parts)
		{
		{
			/*
			/*
@@ -252,6 +253,9 @@ static int mtdpart_setup_real(char *s)
			 return 0;
			 return 0;
		 }
		 }


		/* align this_mtd */
		this_mtd = (struct cmdline_mtd_partition *) 
			ALIGN((unsigned long)this_mtd, sizeof(void*));
		/* enter results */	    
		/* enter results */	    
		this_mtd->parts = parts;
		this_mtd->parts = parts;
		this_mtd->num_parts = num_parts;
		this_mtd->num_parts = num_parts;