diff --git a/repos/dde_linux/src/drivers/usb_host/dummies.c b/repos/dde_linux/src/drivers/usb_host/dummies.c index a3eda534e9..6b76687da1 100644 --- a/repos/dde_linux/src/drivers/usb_host/dummies.c +++ b/repos/dde_linux/src/drivers/usb_host/dummies.c @@ -840,7 +840,6 @@ int of_device_is_compatible(const struct device_node *device, const char *c ** linux/property.h ** **********************/ -bool device_property_read_bool(struct device *dev, const char *propname) { TRACE; return false; } int device_property_read_u8(struct device *dev, const char *propname, u8 *val) { TRACE; return 0; } int device_property_read_u32(struct device *dev, const char *propname, u32 *val) { TRACE; return 0; } @@ -949,12 +948,6 @@ ktime_t ktime_mono_to_real(ktime_t mono) return -1; } -bool mod_delayed_work(struct workqueue_struct *q, struct delayed_work *w, unsigned long v) -{ - TRACE; - return false; -} - int mutex_lock_killable(struct mutex *lock) { TRACE_AND_STOP; @@ -989,11 +982,6 @@ int pci_reset_function_locked(struct pci_dev *dev) return -1; } -void reinit_completion(struct completion *x) -{ - TRACE_AND_STOP; -} - size_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen, off_t skip) { TRACE_AND_STOP; diff --git a/repos/dde_linux/src/drivers/usb_host/lx_emul.cc b/repos/dde_linux/src/drivers/usb_host/lx_emul.cc index d3f285a7a2..345dd93ddb 100644 --- a/repos/dde_linux/src/drivers/usb_host/lx_emul.cc +++ b/repos/dde_linux/src/drivers/usb_host/lx_emul.cc @@ -711,6 +711,12 @@ long __wait_completion(struct completion *work, unsigned long timeout) } +void reinit_completion(struct completion *work) +{ + init_completion(work); +} + + /*********************** ** linux/workqueue.h ** ***********************/ @@ -718,6 +724,13 @@ long __wait_completion(struct completion *work, unsigned long timeout) #include +bool mod_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork, + unsigned long delay) +{ + return queue_delayed_work(wq, dwork, delay); +} + + void tasklet_init(struct tasklet_struct *t, void (*f)(unsigned long), unsigned long d) { t->func = f; @@ -1014,6 +1027,15 @@ int device_property_read_string(struct device *dev, const char *propname, const } +bool device_property_read_bool(struct device *dev, const char *propname) +{ + for (property * p = dev->of_node ? dev->of_node->properties : nullptr; p; p = p->next) + if (Genode::strcmp(propname, p->name) == 0) return true; + + return false; +} + + /**************** ** linux/of.h ** ****************/