Skip to content

Commit

Permalink
mtd: move mtd->{get,put}_device functions up
Browse files Browse the repository at this point in the history
Move the 'get_device()' and 'put_device()' functions up within
'struct mtd_info' to make them be close to other functions.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Jan 9, 2012
1 parent 5942ddb commit a88d2dc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions include/linux/mtd/mtd.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ struct mtd_info {
int (*block_markbad) (struct mtd_info *mtd, loff_t ofs);
int (*suspend) (struct mtd_info *mtd);
void (*resume) (struct mtd_info *mtd);
/*
* If the driver is something smart, like UBI, it may need to maintain
* its own reference counting. The below functions are only for driver.
*/
int (*get_device) (struct mtd_info *mtd);
void (*put_device) (struct mtd_info *mtd);

/* Backing device capabilities for this device
* - provides mmap capabilities
Expand All @@ -232,13 +238,6 @@ struct mtd_info {
struct module *owner;
struct device dev;
int usecount;

/* If the driver is something smart, like UBI, it may need to maintain
* its own reference counting. The below functions are only for driver.
* The driver may register its callbacks. These callbacks are not
* supposed to be called by MTD users */
int (*get_device) (struct mtd_info *mtd);
void (*put_device) (struct mtd_info *mtd);
};

/*
Expand Down

0 comments on commit a88d2dc

Please sign in to comment.