// Parent returns the parent Device, or nil if the receiver has no parent Device func (d *Device) Parent() *Device { d.lock() defer d.unlock() ptr := C.udev_device_get_parent(d.ptr) if ptr != nil { C.udev_device_ref(ptr) } return d.u.newDevice(ptr) }
func (d Device) Parent() Device { return Device{C.udev_device_get_parent(d.ptr)} }