mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
platform: make better use of to_platform_{device,driver}() macros
This helps the code look more consistent and cleaner. Signed-off-by: Eric Miao <[email protected]> Cc: Kay Sievers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
49b420a13f
commit
71b3e0c1ad
3 changed files with 11 additions and 16 deletions
|
|
@ -4135,10 +4135,9 @@ static int have_no_fdc = -ENODEV;
|
|||
static ssize_t floppy_cmos_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct platform_device *p;
|
||||
struct platform_device *p = to_platform_device(dev);
|
||||
int drive;
|
||||
|
||||
p = container_of(dev, struct platform_device,dev);
|
||||
drive = p->id;
|
||||
return sprintf(buf, "%X\n", UDP->cmos);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue