Merge branch 'pu/misc-fixes'
This commit is contained in:
commit
52df7b6184
|
@ -11,7 +11,7 @@
|
||||||
* useful, but WITHOUT ANY WARRANTY; without even the implied
|
* useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
* See the GNU General Public License for more details.
|
* See the GNU General Public License for more details.
|
||||||
|
*/
|
||||||
/* You have to define the following before including this file:
|
/* You have to define the following before including this file:
|
||||||
|
|
||||||
UWtype -- An unsigned type, default type for operations (typically a "word")
|
UWtype -- An unsigned type, default type for operations (typically a "word")
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
LIST_HEAD(bus_list);
|
LIST_HEAD(bus_list);
|
||||||
EXPORT_SYMBOL(bus_list);
|
EXPORT_SYMBOL(bus_list);
|
||||||
|
|
||||||
struct bus_type *get_bus_by_name(const char *name)
|
static struct bus_type *get_bus_by_name(const char *name)
|
||||||
{
|
{
|
||||||
struct bus_type *bus;
|
struct bus_type *bus;
|
||||||
|
|
||||||
|
|
|
@ -336,6 +336,21 @@ void devices_shutdown(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int dev_get_drvdata(struct device_d *dev, unsigned long *data)
|
||||||
|
{
|
||||||
|
if (dev->of_id_entry) {
|
||||||
|
*data = dev->of_id_entry->data;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dev->id_entry) {
|
||||||
|
*data = dev->id_entry->driver_data;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CMD_DEVINFO
|
#ifdef CONFIG_CMD_DEVINFO
|
||||||
static int do_devinfo_subtree(struct device_d *dev, int depth)
|
static int do_devinfo_subtree(struct device_d *dev, int depth)
|
||||||
{
|
{
|
||||||
|
@ -370,21 +385,6 @@ static int do_devinfo_subtree(struct device_d *dev, int depth)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dev_get_drvdata(struct device_d *dev, unsigned long *data)
|
|
||||||
{
|
|
||||||
if (dev->of_id_entry) {
|
|
||||||
*data = dev->of_id_entry->data;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dev->id_entry) {
|
|
||||||
*data = dev->id_entry->driver_data;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int do_devinfo(int argc, char *argv[])
|
static int do_devinfo(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
struct device_d *dev;
|
struct device_d *dev;
|
||||||
|
|
|
@ -60,6 +60,12 @@ static inline unsigned long long getenv_ull(const char *name)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int export(const char *var)
|
||||||
|
{
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int env_pop_context(void);
|
int env_pop_context(void);
|
||||||
|
|
Loading…
Reference in New Issue