mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
rapidio: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Acked-by: "Bounine, Alexandre" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
978e30c9b4
commit
a253f1eee6
1 changed files with 2 additions and 4 deletions
|
|
@ -125,8 +125,7 @@ rio_read_config(struct file *filp, struct kobject *kobj,
|
|||
struct bin_attribute *bin_attr,
|
||||
char *buf, loff_t off, size_t count)
|
||||
{
|
||||
struct rio_dev *dev =
|
||||
to_rio_dev(container_of(kobj, struct device, kobj));
|
||||
struct rio_dev *dev = to_rio_dev(kobj_to_dev(kobj));
|
||||
unsigned int size = 0x100;
|
||||
loff_t init_off = off;
|
||||
u8 *data = (u8 *) buf;
|
||||
|
|
@ -197,8 +196,7 @@ rio_write_config(struct file *filp, struct kobject *kobj,
|
|||
struct bin_attribute *bin_attr,
|
||||
char *buf, loff_t off, size_t count)
|
||||
{
|
||||
struct rio_dev *dev =
|
||||
to_rio_dev(container_of(kobj, struct device, kobj));
|
||||
struct rio_dev *dev = to_rio_dev(kobj_to_dev(kobj));
|
||||
unsigned int size = count;
|
||||
loff_t init_off = off;
|
||||
u8 *data = (u8 *) buf;
|
||||
|
|
|
|||
Loading…
Reference in a new issue