mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1);
mpic->isu_mask = (1 << mpic->isu_shift) - 1;
- mpic->irqhost = irq_alloc_host(mpic->node, IRQ_HOST_MAP_LINEAR,
- last_irq + 1, &mpic_host_ops,
- intvec_top + 1);
+ mpic->irqhost = irq_domain_add_linear(mpic->node,
- isu_size ? isu_size : mpic->num_sources,
++ last_irq + 1,
+ &mpic_host_ops, mpic);
/*
* FIXME: The code leaks the MPIC object and mappings here; this
}
EXPORT_SYMBOL_GPL(driver_remove_file);
--/**
- * driver_add_kobj - add a kobject below the specified driver
- * @drv: requesting device driver
- * @kobj: kobject to add below this driver
- * @fmt: format string that names the kobject
- *
- * You really don't want to do this, this is only here due to one looney
- * iseries driver, go poke those developers if you are annoyed about
- * this...
- * get_driver - increment driver reference count.
- * @drv: driver.
-- */
- int driver_add_kobj(struct device_driver *drv, struct kobject *kobj,
- const char *fmt, ...)
-struct device_driver *get_driver(struct device_driver *drv)
--{
- va_list args;
- char *name;
- int ret;
-
- va_start(args, fmt);
- name = kvasprintf(GFP_KERNEL, fmt, args);
- va_end(args);
- if (drv) {
- struct driver_private *priv;
- struct kobject *kobj;
--
- if (!name)
- return -ENOMEM;
- kobj = kobject_get(&drv->p->kobj);
- priv = to_driver(kobj);
- return priv->driver;
- }
- return NULL;
-}
-EXPORT_SYMBOL_GPL(get_driver);
--
- ret = kobject_add(kobj, &drv->p->kobj, "%s", name);
- kfree(name);
- return ret;
-/**
- * put_driver - decrement driver's refcount.
- * @drv: driver.
- */
-void put_driver(struct device_driver *drv)
-{
- kobject_put(&drv->p->kobj);
--}
- EXPORT_SYMBOL_GPL(driver_add_kobj);
-EXPORT_SYMBOL_GPL(put_driver);
--
static int driver_add_groups(struct device_driver *drv,
const struct attribute_group **groups)
{
uint32_t args[MAX_PHANDLE_ARGS];
};
-#if defined(CONFIG_SPARC) || !defined(CONFIG_OF)
+ #if defined(CONFIG_EEH)
+ static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
+ {
+ return dn->edev;
+ }
+ #endif
+
+#ifdef CONFIG_OF_DYNAMIC
+extern struct device_node *of_node_get(struct device_node *node);
+extern void of_node_put(struct device_node *node);
+#else /* CONFIG_OF_DYNAMIC */
/* Dummy ref counting routines - to be implemented later */
static inline struct device_node *of_node_get(struct device_node *node)
{