This changes the MTD core to handle pci_name() now returning a constant
string.
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
{
struct block_device *bdev;
struct block2mtd_dev *dev;
{
struct block_device *bdev;
struct block2mtd_dev *dev;
if (!devname)
return NULL;
if (!devname)
return NULL;
/* Setup the MTD structure */
/* make the name contain the block device in */
/* Setup the MTD structure */
/* make the name contain the block device in */
- dev->mtd.name = kmalloc(sizeof("block2mtd: ") + strlen(devname),
+ name = kmalloc(sizeof("block2mtd: ") + strlen(devname) + 1,
- sprintf(dev->mtd.name, "block2mtd: %s", devname);
+ sprintf(name, "block2mtd: %s", devname);
+ dev->mtd.name = name;
dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
dev->mtd.erasesize = erase_size;
dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
dev->mtd.erasesize = erase_size;
unsigned long size;
resource_size_t phys;
#define NO_XIP (-1UL)
unsigned long size;
resource_size_t phys;
#define NO_XIP (-1UL)
u_int32_t oobavail; // Available OOB bytes per block
// Kernel-only stuff starts here.
u_int32_t oobavail; // Available OOB bytes per block
// Kernel-only stuff starts here.
int index;
/* ecc layout structure pointer - read only ! */
int index;
/* ecc layout structure pointer - read only ! */