Move helpers from headers to source files
Move helper functions that are used in only one source file to that file. Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
a7370366cb
commit
2aae800c45
@ -13,6 +13,11 @@
|
||||
|
||||
#define CASDSK_DISK_OPEN_FMODE (FMODE_READ | FMODE_WRITE)
|
||||
|
||||
static inline struct casdsk_disk *casdsk_kobj_to_disk(struct kobject *kobj)
|
||||
{
|
||||
return container_of(kobj, struct casdsk_disk, kobj);
|
||||
}
|
||||
|
||||
static inline struct block_device *open_bdev_exclusive(const char *path,
|
||||
fmode_t mode,
|
||||
void *holder)
|
||||
|
@ -41,9 +41,5 @@ void casdsk_deinit_disks(void);
|
||||
|
||||
int casdsk_disk_allocate_minors(int count);
|
||||
|
||||
static inline struct casdsk_disk *casdsk_kobj_to_disk(struct kobject *kobj)
|
||||
{
|
||||
return container_of(kobj, struct casdsk_disk, kobj);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -20,6 +20,11 @@
|
||||
#define CASDSK_DEV_MINORS 16
|
||||
#define KMEM_CACHE_MIN_SIZE sizeof(void *)
|
||||
|
||||
static inline struct casdsk_exp_obj *casdsk_kobj_to_exp_obj(struct kobject *kobj)
|
||||
{
|
||||
return container_of(kobj, struct casdsk_exp_obj, kobj);
|
||||
}
|
||||
|
||||
static inline int bd_claim_by_disk(struct block_device *bdev, void *holder,
|
||||
struct gendisk *disk)
|
||||
{
|
||||
|
@ -40,9 +40,4 @@ void casdsk_deinit_exp_objs(void);
|
||||
|
||||
void casdsk_exp_obj_free(struct casdsk_disk *dsk);
|
||||
|
||||
static inline struct casdsk_exp_obj *casdsk_kobj_to_exp_obj(struct kobject *kobj)
|
||||
{
|
||||
return container_of(kobj, struct casdsk_exp_obj, kobj);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user