summaryrefslogtreecommitdiff
path: root/libmachdev/machdev.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-11 13:54:57 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-11 15:14:43 +0200
commit4f2e373ffe6ff5931fd60d229d3807768374d59f (patch)
tree92ce158b180922c1573f1cd2d1362217aadf256f /libmachdev/machdev.h
parentc1685eb975f84c5df38f20eb4698ede36a1653e1 (diff)
libmachdev: avoid doing pointer arithmetic to get the port_info
Previously, mach_convert_port_to_device would return a pointer to struct emul_device, which is embedded in struct mach_device. In order to get to the port_info structure which is right before that, device_to_pi would subtract offsetof (struct mach_device, dev) from the pointer. Avoid that by making mach_convert_port_to_device return a pointer to struct mach_device instead. * libmachdev/ds_routines.c (mach_convert_port_to_device): Return struct mach_dev *. (device_to_pi): Remove now unused function. (ds_device_close): Adjust accordingly. (ds_device_write): Likewise. (ds_device_write_inband): Likewise. (ds_device_read): Likewise. (ds_device_read_inband): Likewise. (ds_device_set_status): Likewise. (ds_device_get_status): Likewise. (ds_device_set_filter): Likewise.
Diffstat (limited to 'libmachdev/machdev.h')
0 files changed, 0 insertions, 0 deletions