mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
block: unify sysfs size node handling
Now that capacity and __dev are moved to part0, part0 and others can share the same method. Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
548b10eb29
commit
e561052149
3 changed files with 6 additions and 11 deletions
|
|
@ -208,8 +208,8 @@ static ssize_t part_start_show(struct device *dev,
|
|||
return sprintf(buf, "%llu\n",(unsigned long long)p->start_sect);
|
||||
}
|
||||
|
||||
static ssize_t part_size_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
ssize_t part_size_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct hd_struct *p = dev_to_part(dev);
|
||||
return sprintf(buf, "%llu\n",(unsigned long long)p->nr_sects);
|
||||
|
|
|
|||
Loading…
Reference in a new issue