7eff2e7a8b
This changes the uevent buffer functions to use a struct instead of a long list of parameters. It does no longer require the caller to do the proper buffer termination and size accounting, which is currently wrong in some places. It fixes a known bug where parts of the uevent environment are overwritten because of wrong index calculations. Many thanks to Mathieu Desnoyers for finding bugs and improving the error handling. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
30 lines
775 B
C
30 lines
775 B
C
#ifndef _ASM_POWERPC_OF_DEVICE_H
|
|
#define _ASM_POWERPC_OF_DEVICE_H
|
|
#ifdef __KERNEL__
|
|
|
|
#include <linux/device.h>
|
|
#include <linux/of.h>
|
|
|
|
/*
|
|
* The of_device is a kind of "base class" that is a superset of
|
|
* struct device for use by devices attached to an OF node and
|
|
* probed using OF properties.
|
|
*/
|
|
struct of_device
|
|
{
|
|
struct device_node *node; /* to be obsoleted */
|
|
u64 dma_mask; /* DMA mask */
|
|
struct device dev; /* Generic device interface */
|
|
};
|
|
|
|
extern ssize_t of_device_get_modalias(struct of_device *ofdev,
|
|
char *str, ssize_t len);
|
|
extern int of_device_uevent(struct device *dev,
|
|
struct kobj_uevent_env *env);
|
|
|
|
/* This is just here during the transition */
|
|
#include <linux/of_device.h>
|
|
|
|
#endif /* __KERNEL__ */
|
|
#endif /* _ASM_POWERPC_OF_DEVICE_H */
|