Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: mmc_spi: Fix unterminated of_match_table of/sparc: fix build regression from of_device changes of/device: Replace struct of_device with struct platform_device
This commit is contained in:
commit
58d4ea65b9
|
@ -102,7 +102,7 @@ static struct of_device_id mpc837x_ids[] = {
|
|||
|
||||
static int __init mpc837x_declare_of_platform_devices(void)
|
||||
{
|
||||
/* Publish of_device */
|
||||
/* Publish platform_device */
|
||||
of_platform_bus_probe(NULL, mpc837x_ids, NULL);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -78,7 +78,7 @@ static struct of_device_id mpc837x_ids[] = {
|
|||
|
||||
static int __init mpc837x_declare_of_platform_devices(void)
|
||||
{
|
||||
/* Publish of_device */
|
||||
/* Publish platform_device */
|
||||
of_platform_bus_probe(NULL, mpc837x_ids, NULL);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1332,7 +1332,7 @@ static inline void fsl_rio_info(struct device *dev, u32 ccsr)
|
|||
|
||||
/**
|
||||
* fsl_rio_setup - Setup Freescale PowerPC RapidIO interface
|
||||
* @dev: of_device pointer
|
||||
* @dev: platform_device pointer
|
||||
*
|
||||
* Initializes MPC85xx RapidIO hardware interface, configures
|
||||
* master port with system-specific info, and registers the
|
||||
|
|
|
@ -680,7 +680,7 @@ mpc52xx_ata_remove_one(struct device *dev)
|
|||
/* ======================================================================== */
|
||||
|
||||
static int __devinit
|
||||
mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
|
||||
mpc52xx_ata_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
unsigned int ipb_freq;
|
||||
struct resource res_mem;
|
||||
|
@ -821,7 +821,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
|
|||
}
|
||||
|
||||
static int
|
||||
mpc52xx_ata_remove(struct of_device *op)
|
||||
mpc52xx_ata_remove(struct platform_device *op)
|
||||
{
|
||||
struct mpc52xx_ata_priv *priv;
|
||||
int task_irq;
|
||||
|
@ -848,7 +848,7 @@ mpc52xx_ata_remove(struct of_device *op)
|
|||
#ifdef CONFIG_PM
|
||||
|
||||
static int
|
||||
mpc52xx_ata_suspend(struct of_device *op, pm_message_t state)
|
||||
mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state)
|
||||
{
|
||||
struct ata_host *host = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
@ -856,7 +856,7 @@ mpc52xx_ata_suspend(struct of_device *op, pm_message_t state)
|
|||
}
|
||||
|
||||
static int
|
||||
mpc52xx_ata_resume(struct of_device *op)
|
||||
mpc52xx_ata_resume(struct platform_device *op)
|
||||
{
|
||||
struct ata_host *host = dev_get_drvdata(&op->dev);
|
||||
struct mpc52xx_ata_priv *priv = host->private_data;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include <linux/of_platform.h>
|
||||
#include <linux/ata_platform.h>
|
||||
|
||||
static int __devinit pata_of_platform_probe(struct of_device *ofdev,
|
||||
static int __devinit pata_of_platform_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
int ret;
|
||||
|
@ -78,7 +78,7 @@ static int __devinit pata_of_platform_probe(struct of_device *ofdev,
|
|||
reg_shift, pio_mask);
|
||||
}
|
||||
|
||||
static int __devexit pata_of_platform_remove(struct of_device *ofdev)
|
||||
static int __devexit pata_of_platform_remove(struct platform_device *ofdev)
|
||||
{
|
||||
return __pata_platform_remove(&ofdev->dev);
|
||||
}
|
||||
|
|
|
@ -1296,7 +1296,7 @@ static const struct ata_port_info sata_fsl_port_info[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static int sata_fsl_probe(struct of_device *ofdev,
|
||||
static int sata_fsl_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
int retval = -ENXIO;
|
||||
|
@ -1370,7 +1370,7 @@ error_exit_with_cleanup:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static int sata_fsl_remove(struct of_device *ofdev)
|
||||
static int sata_fsl_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct ata_host *host = dev_get_drvdata(&ofdev->dev);
|
||||
struct sata_fsl_host_priv *host_priv = host->private_data;
|
||||
|
@ -1387,13 +1387,13 @@ static int sata_fsl_remove(struct of_device *ofdev)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int sata_fsl_suspend(struct of_device *op, pm_message_t state)
|
||||
static int sata_fsl_suspend(struct platform_device *op, pm_message_t state)
|
||||
{
|
||||
struct ata_host *host = dev_get_drvdata(&op->dev);
|
||||
return ata_host_suspend(host, state);
|
||||
}
|
||||
|
||||
static int sata_fsl_resume(struct of_device *op)
|
||||
static int sata_fsl_resume(struct platform_device *op)
|
||||
{
|
||||
struct ata_host *host = dev_get_drvdata(&op->dev);
|
||||
struct sata_fsl_host_priv *host_priv = host->private_data;
|
||||
|
|
|
@ -674,7 +674,7 @@ static void fore200e_sba_write(u32 val, volatile u32 __iomem *addr)
|
|||
|
||||
static u32 fore200e_sba_dma_map(struct fore200e *fore200e, void* virt_addr, int size, int direction)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
u32 dma_addr;
|
||||
|
||||
dma_addr = dma_map_single(&op->dev, virt_addr, size, direction);
|
||||
|
@ -687,7 +687,7 @@ static u32 fore200e_sba_dma_map(struct fore200e *fore200e, void* virt_addr, int
|
|||
|
||||
static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int size, int direction)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
|
||||
DPRINTK(3, "SBUS DVMA unmapping: dma_addr = 0x%08x, size = %d, direction = %d,\n",
|
||||
dma_addr, size, direction);
|
||||
|
@ -697,7 +697,7 @@ static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int
|
|||
|
||||
static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_addr, int size, int direction)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
|
||||
DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction);
|
||||
|
||||
|
@ -706,7 +706,7 @@ static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_add
|
|||
|
||||
static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_addr, int size, int direction)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
|
||||
DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction);
|
||||
|
||||
|
@ -719,7 +719,7 @@ static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_
|
|||
static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk *chunk,
|
||||
int size, int nbr, int alignment)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
|
||||
chunk->alloc_size = chunk->align_size = size * nbr;
|
||||
|
||||
|
@ -738,7 +738,7 @@ static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk
|
|||
/* free a DVMA consistent chunk of memory */
|
||||
static void fore200e_sba_dma_chunk_free(struct fore200e *fore200e, struct chunk *chunk)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
|
||||
dma_free_coherent(&op->dev, chunk->alloc_size,
|
||||
chunk->alloc_addr, chunk->dma_addr);
|
||||
|
@ -770,7 +770,7 @@ static void fore200e_sba_reset(struct fore200e *fore200e)
|
|||
|
||||
static int __init fore200e_sba_map(struct fore200e *fore200e)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
unsigned int bursts;
|
||||
|
||||
/* gain access to the SBA specific registers */
|
||||
|
@ -800,7 +800,7 @@ static int __init fore200e_sba_map(struct fore200e *fore200e)
|
|||
|
||||
static void fore200e_sba_unmap(struct fore200e *fore200e)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
|
||||
of_iounmap(&op->resource[0], fore200e->regs.sba.hcr, SBA200E_HCR_LENGTH);
|
||||
of_iounmap(&op->resource[1], fore200e->regs.sba.bsr, SBA200E_BSR_LENGTH);
|
||||
|
@ -816,7 +816,7 @@ static int __init fore200e_sba_configure(struct fore200e *fore200e)
|
|||
|
||||
static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_data *prom)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
const u8 *prop;
|
||||
int len;
|
||||
|
||||
|
@ -840,7 +840,7 @@ static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_
|
|||
|
||||
static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page)
|
||||
{
|
||||
struct of_device *op = fore200e->bus_dev;
|
||||
struct platform_device *op = fore200e->bus_dev;
|
||||
const struct linux_prom_registers *regs;
|
||||
|
||||
regs = of_get_property(op->dev.of_node, "reg", NULL);
|
||||
|
@ -2513,7 +2513,7 @@ fore200e_load_and_start_fw(struct fore200e* fore200e)
|
|||
device = &((struct pci_dev *) fore200e->bus_dev)->dev;
|
||||
#ifdef CONFIG_SBUS
|
||||
else if (strcmp(fore200e->bus->model_name, "SBA-200E") == 0)
|
||||
device = &((struct of_device *) fore200e->bus_dev)->dev;
|
||||
device = &((struct platform_device *) fore200e->bus_dev)->dev;
|
||||
#endif
|
||||
else
|
||||
return err;
|
||||
|
@ -2643,7 +2643,7 @@ fore200e_init(struct fore200e* fore200e)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_SBUS
|
||||
static int __devinit fore200e_sba_probe(struct of_device *op,
|
||||
static int __devinit fore200e_sba_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
const struct fore200e_bus *bus = match->data;
|
||||
|
@ -2675,7 +2675,7 @@ static int __devinit fore200e_sba_probe(struct of_device *op,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devexit fore200e_sba_remove(struct of_device *op)
|
||||
static int __devexit fore200e_sba_remove(struct platform_device *op)
|
||||
{
|
||||
struct fore200e *fore200e = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
|
|
@ -1194,7 +1194,7 @@ static struct platform_driver ace_platform_driver = {
|
|||
|
||||
#if defined(CONFIG_OF)
|
||||
static int __devinit
|
||||
ace_of_probe(struct of_device *op, const struct of_device_id *match)
|
||||
ace_of_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct resource res;
|
||||
resource_size_t physaddr;
|
||||
|
@ -1226,7 +1226,7 @@ ace_of_probe(struct of_device *op, const struct of_device_id *match)
|
|||
return ace_alloc(&op->dev, id ? *id : 0, physaddr, irq, bus_width);
|
||||
}
|
||||
|
||||
static int __devexit ace_of_remove(struct of_device *op)
|
||||
static int __devexit ace_of_remove(struct platform_device *op)
|
||||
{
|
||||
ace_free(&op->dev);
|
||||
return 0;
|
||||
|
|
|
@ -619,7 +619,7 @@ static void __devinit n2rng_driver_version(void)
|
|||
pr_info("%s", version);
|
||||
}
|
||||
|
||||
static int __devinit n2rng_probe(struct of_device *op,
|
||||
static int __devinit n2rng_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
int victoria_falls = (match->data != NULL);
|
||||
|
@ -714,7 +714,7 @@ out:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit n2rng_remove(struct of_device *op)
|
||||
static int __devexit n2rng_remove(struct platform_device *op)
|
||||
{
|
||||
struct n2rng *np = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ struct n2rng_unit {
|
|||
};
|
||||
|
||||
struct n2rng {
|
||||
struct of_device *op;
|
||||
struct platform_device *op;
|
||||
|
||||
unsigned long flags;
|
||||
#define N2RNG_FLAG_VF 0x00000001 /* Victoria Falls RNG, else N2 */
|
||||
|
|
|
@ -94,7 +94,7 @@ static struct hwrng pasemi_rng = {
|
|||
.data_read = pasemi_rng_data_read,
|
||||
};
|
||||
|
||||
static int __devinit rng_probe(struct of_device *ofdev,
|
||||
static int __devinit rng_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
void __iomem *rng_regs;
|
||||
|
@ -123,7 +123,7 @@ static int __devinit rng_probe(struct of_device *ofdev,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit rng_remove(struct of_device *dev)
|
||||
static int __devexit rng_remove(struct platform_device *dev)
|
||||
{
|
||||
void __iomem *rng_regs = (void __iomem *)pasemi_rng.priv;
|
||||
|
||||
|
|
|
@ -2528,7 +2528,7 @@ static struct pci_driver ipmi_pci_driver = {
|
|||
|
||||
|
||||
#ifdef CONFIG_PPC_OF
|
||||
static int __devinit ipmi_of_probe(struct of_device *dev,
|
||||
static int __devinit ipmi_of_probe(struct platform_device *dev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct smi_info *info;
|
||||
|
@ -2607,7 +2607,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devexit ipmi_of_remove(struct of_device *dev)
|
||||
static int __devexit ipmi_of_remove(struct platform_device *dev)
|
||||
{
|
||||
cleanup_one_si(dev_get_drvdata(&dev->dev));
|
||||
return 0;
|
||||
|
|
|
@ -961,7 +961,7 @@ static int __init rtc_init(void)
|
|||
#endif
|
||||
#ifdef CONFIG_SPARC32
|
||||
struct device_node *ebus_dp;
|
||||
struct of_device *op;
|
||||
struct platform_device *op;
|
||||
#else
|
||||
void *r;
|
||||
#ifdef RTC_IRQ
|
||||
|
|
|
@ -761,7 +761,7 @@ static struct platform_driver hwicap_platform_driver = {
|
|||
|
||||
#if defined(CONFIG_OF)
|
||||
static int __devinit
|
||||
hwicap_of_probe(struct of_device *op, const struct of_device_id *match)
|
||||
hwicap_of_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct resource res;
|
||||
const unsigned int *id;
|
||||
|
@ -798,7 +798,7 @@ hwicap_of_probe(struct of_device *op, const struct of_device_id *match)
|
|||
regs);
|
||||
}
|
||||
|
||||
static int __devexit hwicap_of_remove(struct of_device *op)
|
||||
static int __devexit hwicap_of_remove(struct platform_device *op)
|
||||
{
|
||||
return hwicap_remove(&op->dev);
|
||||
}
|
||||
|
|
|
@ -1150,7 +1150,7 @@ struct crypto4xx_alg_common crypto4xx_alg[] = {
|
|||
/**
|
||||
* Module Initialization Routine
|
||||
*/
|
||||
static int __init crypto4xx_probe(struct of_device *ofdev,
|
||||
static int __init crypto4xx_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
int rc;
|
||||
|
@ -1258,7 +1258,7 @@ err_alloc_dev:
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int __exit crypto4xx_remove(struct of_device *ofdev)
|
||||
static int __exit crypto4xx_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct device *dev = &ofdev->dev;
|
||||
struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
|
||||
|
|
|
@ -104,7 +104,7 @@ struct crypto4xx_device {
|
|||
|
||||
struct crypto4xx_core_device {
|
||||
struct device *device;
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
struct crypto4xx_device *dev;
|
||||
u32 int_status;
|
||||
u32 irq;
|
||||
|
|
|
@ -1552,7 +1552,7 @@ static void __exit n2_unregister_algs(void)
|
|||
|
||||
/* To map CWQ queues to interrupt sources, the hypervisor API provides
|
||||
* a devino. This isn't very useful to us because all of the
|
||||
* interrupts listed in the of_device node have been translated to
|
||||
* interrupts listed in the device_node have been translated to
|
||||
* Linux virtual IRQ cookie numbers.
|
||||
*
|
||||
* So we have to back-translate, going through the 'intr' and 'ino'
|
||||
|
@ -1560,7 +1560,7 @@ static void __exit n2_unregister_algs(void)
|
|||
* 'interrupts' property entries, in order to to figure out which
|
||||
* devino goes to which already-translated IRQ.
|
||||
*/
|
||||
static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip,
|
||||
static int find_devino_index(struct platform_device *dev, struct spu_mdesc_info *ip,
|
||||
unsigned long dev_ino)
|
||||
{
|
||||
const unsigned int *dev_intrs;
|
||||
|
@ -1580,7 +1580,7 @@ static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip,
|
|||
if (!dev_intrs)
|
||||
return -ENODEV;
|
||||
|
||||
for (i = 0; i < dev->num_irqs; i++) {
|
||||
for (i = 0; i < dev->archdata.num_irqs; i++) {
|
||||
if (dev_intrs[i] == intr)
|
||||
return i;
|
||||
}
|
||||
|
@ -1588,7 +1588,7 @@ static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip,
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int spu_map_ino(struct of_device *dev, struct spu_mdesc_info *ip,
|
||||
static int spu_map_ino(struct platform_device *dev, struct spu_mdesc_info *ip,
|
||||
const char *irq_name, struct spu_queue *p,
|
||||
irq_handler_t handler)
|
||||
{
|
||||
|
@ -1603,7 +1603,7 @@ static int spu_map_ino(struct of_device *dev, struct spu_mdesc_info *ip,
|
|||
if (index < 0)
|
||||
return index;
|
||||
|
||||
p->irq = dev->irqs[index];
|
||||
p->irq = dev->archdata.irqs[index];
|
||||
|
||||
sprintf(p->irq_name, "%s-%d", irq_name, index);
|
||||
|
||||
|
@ -1736,7 +1736,7 @@ static void spu_list_destroy(struct list_head *list)
|
|||
* gathering cpu membership information.
|
||||
*/
|
||||
static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc,
|
||||
struct of_device *dev,
|
||||
struct platform_device *dev,
|
||||
u64 node, struct spu_queue *p,
|
||||
struct spu_queue **table)
|
||||
{
|
||||
|
@ -1763,7 +1763,7 @@ static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc,
|
|||
|
||||
/* Process an 'exec-unit' MDESC node of type 'cwq'. */
|
||||
static int handle_exec_unit(struct spu_mdesc_info *ip, struct list_head *list,
|
||||
struct of_device *dev, struct mdesc_handle *mdesc,
|
||||
struct platform_device *dev, struct mdesc_handle *mdesc,
|
||||
u64 node, const char *iname, unsigned long q_type,
|
||||
irq_handler_t handler, struct spu_queue **table)
|
||||
{
|
||||
|
@ -1794,7 +1794,7 @@ static int handle_exec_unit(struct spu_mdesc_info *ip, struct list_head *list,
|
|||
return spu_map_ino(dev, ip, iname, p, handler);
|
||||
}
|
||||
|
||||
static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct of_device *dev,
|
||||
static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct platform_device *dev,
|
||||
struct spu_mdesc_info *ip, struct list_head *list,
|
||||
const char *exec_name, unsigned long q_type,
|
||||
irq_handler_t handler, struct spu_queue **table)
|
||||
|
@ -1855,7 +1855,7 @@ static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
|
|||
}
|
||||
|
||||
static int __devinit grab_mdesc_irq_props(struct mdesc_handle *mdesc,
|
||||
struct of_device *dev,
|
||||
struct platform_device *dev,
|
||||
struct spu_mdesc_info *ip,
|
||||
const char *node_name)
|
||||
{
|
||||
|
@ -2004,7 +2004,7 @@ static void __devinit n2_spu_driver_version(void)
|
|||
pr_info("%s", version);
|
||||
}
|
||||
|
||||
static int __devinit n2_crypto_probe(struct of_device *dev,
|
||||
static int __devinit n2_crypto_probe(struct platform_device *dev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct mdesc_handle *mdesc;
|
||||
|
@ -2081,7 +2081,7 @@ out_free_n2cp:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit n2_crypto_remove(struct of_device *dev)
|
||||
static int __devexit n2_crypto_remove(struct platform_device *dev)
|
||||
{
|
||||
struct n2_crypto *np = dev_get_drvdata(&dev->dev);
|
||||
|
||||
|
@ -2116,7 +2116,7 @@ static void free_ncp(struct n2_mau *mp)
|
|||
kfree(mp);
|
||||
}
|
||||
|
||||
static int __devinit n2_mau_probe(struct of_device *dev,
|
||||
static int __devinit n2_mau_probe(struct platform_device *dev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct mdesc_handle *mdesc;
|
||||
|
@ -2184,7 +2184,7 @@ out_free_ncp:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit n2_mau_remove(struct of_device *dev)
|
||||
static int __devexit n2_mau_remove(struct platform_device *dev)
|
||||
{
|
||||
struct n2_mau *mp = dev_get_drvdata(&dev->dev);
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ struct talitos_channel {
|
|||
|
||||
struct talitos_private {
|
||||
struct device *dev;
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
void __iomem *reg;
|
||||
int irq;
|
||||
|
||||
|
@ -2308,7 +2308,7 @@ static int hw_supports(struct device *dev, __be32 desc_hdr_template)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int talitos_remove(struct of_device *ofdev)
|
||||
static int talitos_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct device *dev = &ofdev->dev;
|
||||
struct talitos_private *priv = dev_get_drvdata(dev);
|
||||
|
@ -2401,7 +2401,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
|
|||
return t_alg;
|
||||
}
|
||||
|
||||
static int talitos_probe(struct of_device *ofdev,
|
||||
static int talitos_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device *dev = &ofdev->dev;
|
||||
|
|
|
@ -1297,7 +1297,7 @@ static void fsl_dma_chan_remove(struct fsldma_chan *chan)
|
|||
kfree(chan);
|
||||
}
|
||||
|
||||
static int __devinit fsldma_of_probe(struct of_device *op,
|
||||
static int __devinit fsldma_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct fsldma_device *fdev;
|
||||
|
@ -1382,7 +1382,7 @@ out_return:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int fsldma_of_remove(struct of_device *op)
|
||||
static int fsldma_of_remove(struct platform_device *op)
|
||||
{
|
||||
struct fsldma_device *fdev;
|
||||
unsigned int i;
|
||||
|
|
|
@ -627,7 +627,7 @@ mpc_dma_prep_memcpy(struct dma_chan *chan, dma_addr_t dst, dma_addr_t src,
|
|||
return &mdesc->desc;
|
||||
}
|
||||
|
||||
static int __devinit mpc_dma_probe(struct of_device *op,
|
||||
static int __devinit mpc_dma_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dn = op->dev.of_node;
|
||||
|
@ -753,7 +753,7 @@ static int __devinit mpc_dma_probe(struct of_device *op,
|
|||
return retval;
|
||||
}
|
||||
|
||||
static int __devexit mpc_dma_remove(struct of_device *op)
|
||||
static int __devexit mpc_dma_remove(struct platform_device *op)
|
||||
{
|
||||
struct device *dev = &op->dev;
|
||||
struct mpc_dma *mdma = dev_get_drvdata(dev);
|
||||
|
|
|
@ -4257,11 +4257,11 @@ static int ppc440spe_adma_setup_irqs(struct ppc440spe_adma_device *adev,
|
|||
struct ppc440spe_adma_chan *chan,
|
||||
int *initcode)
|
||||
{
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
struct device_node *np;
|
||||
int ret;
|
||||
|
||||
ofdev = container_of(adev->dev, struct of_device, dev);
|
||||
ofdev = container_of(adev->dev, struct platform_device, dev);
|
||||
np = ofdev->dev.of_node;
|
||||
if (adev->id != PPC440SPE_XOR_ID) {
|
||||
adev->err_irq = irq_of_parse_and_map(np, 1);
|
||||
|
@ -4393,7 +4393,7 @@ static void ppc440spe_adma_release_irqs(struct ppc440spe_adma_device *adev,
|
|||
/**
|
||||
* ppc440spe_adma_probe - probe the asynch device
|
||||
*/
|
||||
static int __devinit ppc440spe_adma_probe(struct of_device *ofdev,
|
||||
static int __devinit ppc440spe_adma_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
@ -4625,7 +4625,7 @@ out:
|
|||
/**
|
||||
* ppc440spe_adma_remove - remove the asynch device
|
||||
*/
|
||||
static int __devexit ppc440spe_adma_remove(struct of_device *ofdev)
|
||||
static int __devexit ppc440spe_adma_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev);
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
|
|
@ -200,7 +200,7 @@ static irqreturn_t mpc85xx_pci_isr(int irq, void *dev_id)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int __devinit mpc85xx_pci_err_probe(struct of_device *op,
|
||||
static int __devinit mpc85xx_pci_err_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct edac_pci_ctl_info *pci;
|
||||
|
@ -305,7 +305,7 @@ err:
|
|||
return res;
|
||||
}
|
||||
|
||||
static int mpc85xx_pci_err_remove(struct of_device *op)
|
||||
static int mpc85xx_pci_err_remove(struct platform_device *op)
|
||||
{
|
||||
struct edac_pci_ctl_info *pci = dev_get_drvdata(&op->dev);
|
||||
struct mpc85xx_pci_pdata *pdata = pci->pvt_info;
|
||||
|
@ -503,7 +503,7 @@ static irqreturn_t mpc85xx_l2_isr(int irq, void *dev_id)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int __devinit mpc85xx_l2_err_probe(struct of_device *op,
|
||||
static int __devinit mpc85xx_l2_err_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct edac_device_ctl_info *edac_dev;
|
||||
|
@ -613,7 +613,7 @@ err:
|
|||
return res;
|
||||
}
|
||||
|
||||
static int mpc85xx_l2_err_remove(struct of_device *op)
|
||||
static int mpc85xx_l2_err_remove(struct platform_device *op)
|
||||
{
|
||||
struct edac_device_ctl_info *edac_dev = dev_get_drvdata(&op->dev);
|
||||
struct mpc85xx_l2_pdata *pdata = edac_dev->pvt_info;
|
||||
|
@ -956,7 +956,7 @@ static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci)
|
|||
}
|
||||
}
|
||||
|
||||
static int __devinit mpc85xx_mc_err_probe(struct of_device *op,
|
||||
static int __devinit mpc85xx_mc_err_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct mem_ctl_info *mci;
|
||||
|
@ -1088,7 +1088,7 @@ err:
|
|||
return res;
|
||||
}
|
||||
|
||||
static int mpc85xx_mc_err_remove(struct of_device *op)
|
||||
static int mpc85xx_mc_err_remove(struct platform_device *op)
|
||||
{
|
||||
struct mem_ctl_info *mci = dev_get_drvdata(&op->dev);
|
||||
struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
|
||||
|
|
|
@ -184,9 +184,9 @@ struct ppc4xx_ecc_status {
|
|||
|
||||
/* Function Prototypes */
|
||||
|
||||
static int ppc4xx_edac_probe(struct of_device *device,
|
||||
static int ppc4xx_edac_probe(struct platform_device *device,
|
||||
const struct of_device_id *device_id);
|
||||
static int ppc4xx_edac_remove(struct of_device *device);
|
||||
static int ppc4xx_edac_remove(struct platform_device *device);
|
||||
|
||||
/* Global Variables */
|
||||
|
||||
|
@ -1014,7 +1014,7 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
|
|||
*/
|
||||
static int __devinit
|
||||
ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
|
||||
struct of_device *op,
|
||||
struct platform_device *op,
|
||||
const struct of_device_id *match,
|
||||
const dcr_host_t *dcr_host,
|
||||
u32 mcopt1)
|
||||
|
@ -1108,7 +1108,7 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
|
|||
* mapped and assigned.
|
||||
*/
|
||||
static int __devinit
|
||||
ppc4xx_edac_register_irq(struct of_device *op, struct mem_ctl_info *mci)
|
||||
ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci)
|
||||
{
|
||||
int status = 0;
|
||||
int ded_irq, sec_irq;
|
||||
|
@ -1238,7 +1238,7 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host)
|
|||
* driver; otherwise, < 0 on error.
|
||||
*/
|
||||
static int __devinit
|
||||
ppc4xx_edac_probe(struct of_device *op, const struct of_device_id *match)
|
||||
ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
int status = 0;
|
||||
u32 mcopt1, memcheck;
|
||||
|
@ -1359,7 +1359,7 @@ ppc4xx_edac_probe(struct of_device *op, const struct of_device_id *match)
|
|||
* Unconditionally returns 0.
|
||||
*/
|
||||
static int
|
||||
ppc4xx_edac_remove(struct of_device *op)
|
||||
ppc4xx_edac_remove(struct platform_device *op)
|
||||
{
|
||||
struct mem_ctl_info *mci = dev_get_drvdata(&op->dev);
|
||||
struct ppc4xx_edac_pdata *pdata = mci->pvt_info;
|
||||
|
|
|
@ -23,7 +23,7 @@ struct ams {
|
|||
|
||||
/* General properties */
|
||||
struct device_node *of_node;
|
||||
struct of_device *of_dev;
|
||||
struct platform_device *of_dev;
|
||||
char has_device;
|
||||
char vflag;
|
||||
u32 orient1;
|
||||
|
|
|
@ -234,7 +234,7 @@ static const struct attribute_group env_group = {
|
|||
.attrs = env_attributes,
|
||||
};
|
||||
|
||||
static int __devinit env_probe(struct of_device *op,
|
||||
static int __devinit env_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct env *p = kzalloc(sizeof(*p), GFP_KERNEL);
|
||||
|
@ -276,7 +276,7 @@ out_free:
|
|||
goto out;
|
||||
}
|
||||
|
||||
static int __devexit env_remove(struct of_device *op)
|
||||
static int __devexit env_remove(struct platform_device *op)
|
||||
{
|
||||
struct env *p = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ struct i2c_reg {
|
|||
|
||||
struct cpm_i2c {
|
||||
char *base;
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
struct i2c_adapter adap;
|
||||
uint dp_addr;
|
||||
int version; /* CPM1=1, CPM2=2 */
|
||||
|
@ -428,7 +428,7 @@ static const struct i2c_adapter cpm_ops = {
|
|||
|
||||
static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
|
||||
{
|
||||
struct of_device *ofdev = cpm->ofdev;
|
||||
struct platform_device *ofdev = cpm->ofdev;
|
||||
const u32 *data;
|
||||
int len, ret, i;
|
||||
void __iomem *i2c_base;
|
||||
|
@ -634,7 +634,7 @@ static void cpm_i2c_shutdown(struct cpm_i2c *cpm)
|
|||
cpm_muram_free(cpm->i2c_addr);
|
||||
}
|
||||
|
||||
static int __devinit cpm_i2c_probe(struct of_device *ofdev,
|
||||
static int __devinit cpm_i2c_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
int result, len;
|
||||
|
@ -687,7 +687,7 @@ out_free:
|
|||
return result;
|
||||
}
|
||||
|
||||
static int __devexit cpm_i2c_remove(struct of_device *ofdev)
|
||||
static int __devexit cpm_i2c_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -661,7 +661,7 @@ static inline u8 iic_clckdiv(unsigned int opb)
|
|||
return (u8)((opb + 9) / 10 - 1);
|
||||
}
|
||||
|
||||
static int __devinit iic_request_irq(struct of_device *ofdev,
|
||||
static int __devinit iic_request_irq(struct platform_device *ofdev,
|
||||
struct ibm_iic_private *dev)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
@ -692,7 +692,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev,
|
|||
/*
|
||||
* Register single IIC interface
|
||||
*/
|
||||
static int __devinit iic_probe(struct of_device *ofdev,
|
||||
static int __devinit iic_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
@ -780,7 +780,7 @@ error_cleanup:
|
|||
/*
|
||||
* Cleanup initialized IIC interface
|
||||
*/
|
||||
static int __devexit iic_remove(struct of_device *ofdev)
|
||||
static int __devexit iic_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -560,7 +560,7 @@ static struct i2c_adapter mpc_ops = {
|
|||
.timeout = HZ,
|
||||
};
|
||||
|
||||
static int __devinit fsl_i2c_probe(struct of_device *op,
|
||||
static int __devinit fsl_i2c_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct mpc_i2c *i2c;
|
||||
|
@ -646,7 +646,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
|
|||
return result;
|
||||
};
|
||||
|
||||
static int __devexit fsl_i2c_remove(struct of_device *op)
|
||||
static int __devexit fsl_i2c_remove(struct platform_device *op)
|
||||
{
|
||||
struct mpc_i2c *i2c = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ struct ehca_sport {
|
|||
|
||||
struct ehca_shca {
|
||||
struct ib_device ib_device;
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
u8 num_ports;
|
||||
int hw_level;
|
||||
struct list_head shca_list;
|
||||
|
|
|
@ -713,7 +713,7 @@ static struct attribute_group ehca_dev_attr_grp = {
|
|||
.attrs = ehca_dev_attrs
|
||||
};
|
||||
|
||||
static int __devinit ehca_probe(struct of_device *dev,
|
||||
static int __devinit ehca_probe(struct platform_device *dev,
|
||||
const struct of_device_id *id)
|
||||
{
|
||||
struct ehca_shca *shca;
|
||||
|
@ -879,7 +879,7 @@ probe1:
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int __devexit ehca_remove(struct of_device *dev)
|
||||
static int __devexit ehca_remove(struct platform_device *dev)
|
||||
{
|
||||
struct ehca_shca *shca = dev_get_drvdata(&dev->dev);
|
||||
unsigned long flags;
|
||||
|
|
|
@ -173,7 +173,7 @@ static int __devinit sparcspkr_probe(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int sparcspkr_shutdown(struct of_device *dev)
|
||||
static int sparcspkr_shutdown(struct platform_device *dev)
|
||||
{
|
||||
struct sparcspkr_state *state = dev_get_drvdata(&dev->dev);
|
||||
struct input_dev *input_dev = state->input_dev;
|
||||
|
@ -184,7 +184,7 @@ static int sparcspkr_shutdown(struct of_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit bbc_beep_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct sparcspkr_state *state;
|
||||
struct bbc_beep_info *info;
|
||||
|
@ -231,7 +231,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit bbc_remove(struct of_device *op)
|
||||
static int __devexit bbc_remove(struct platform_device *op)
|
||||
{
|
||||
struct sparcspkr_state *state = dev_get_drvdata(&op->dev);
|
||||
struct input_dev *input_dev = state->input_dev;
|
||||
|
@ -269,7 +269,7 @@ static struct of_platform_driver bbc_beep_driver = {
|
|||
.shutdown = sparcspkr_shutdown,
|
||||
};
|
||||
|
||||
static int __devinit grover_beep_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct sparcspkr_state *state;
|
||||
struct grover_beep_info *info;
|
||||
|
@ -312,7 +312,7 @@ out_err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit grover_remove(struct of_device *op)
|
||||
static int __devexit grover_remove(struct platform_device *op)
|
||||
{
|
||||
struct sparcspkr_state *state = dev_get_drvdata(&op->dev);
|
||||
struct grover_beep_info *info = &state->u.grover;
|
||||
|
|
|
@ -49,7 +49,7 @@ static inline void i8042_write_command(int val)
|
|||
#define OBP_PS2MS_NAME1 "kdmouse"
|
||||
#define OBP_PS2MS_NAME2 "mouse"
|
||||
|
||||
static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit sparc_i8042_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
|
||||
|
@ -57,7 +57,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
|
|||
while (dp) {
|
||||
if (!strcmp(dp->name, OBP_PS2KBD_NAME1) ||
|
||||
!strcmp(dp->name, OBP_PS2KBD_NAME2)) {
|
||||
struct of_device *kbd = of_find_device_by_node(dp);
|
||||
struct platform_device *kbd = of_find_device_by_node(dp);
|
||||
unsigned int irq = kbd->archdata.irqs[0];
|
||||
if (irq == 0xffffffff)
|
||||
irq = op->archdata.irqs[0];
|
||||
|
@ -67,7 +67,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
|
|||
kbd_res = &kbd->resource[0];
|
||||
} else if (!strcmp(dp->name, OBP_PS2MS_NAME1) ||
|
||||
!strcmp(dp->name, OBP_PS2MS_NAME2)) {
|
||||
struct of_device *ms = of_find_device_by_node(dp);
|
||||
struct platform_device *ms = of_find_device_by_node(dp);
|
||||
unsigned int irq = ms->archdata.irqs[0];
|
||||
if (irq == 0xffffffff)
|
||||
irq = op->archdata.irqs[0];
|
||||
|
@ -80,7 +80,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devexit sparc_i8042_remove(struct of_device *op)
|
||||
static int __devexit sparc_i8042_remove(struct platform_device *op)
|
||||
{
|
||||
of_iounmap(kbd_res, kbd_iobase, 8);
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ static void sxps2_close(struct serio *pserio)
|
|||
* It returns 0, if the driver is bound to the PS/2 device, or a negative
|
||||
* value if there is an error.
|
||||
*/
|
||||
static int __devinit xps2_of_probe(struct of_device *ofdev,
|
||||
static int __devinit xps2_of_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct resource r_irq; /* Interrupt resources */
|
||||
|
@ -332,7 +332,7 @@ failed1:
|
|||
* if the driver module is being unloaded. It frees any resources allocated to
|
||||
* the device.
|
||||
*/
|
||||
static int __devexit xps2_of_remove(struct of_device *of_dev)
|
||||
static int __devexit xps2_of_remove(struct platform_device *of_dev)
|
||||
{
|
||||
struct device *dev = &of_dev->dev;
|
||||
struct xps2data *drvdata = dev_get_drvdata(dev);
|
||||
|
|
|
@ -224,7 +224,7 @@ struct gpio_led_of_platform_data {
|
|||
struct gpio_led_data led_data[];
|
||||
};
|
||||
|
||||
static int __devinit of_gpio_leds_probe(struct of_device *ofdev,
|
||||
static int __devinit of_gpio_leds_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node, *child;
|
||||
|
@ -283,7 +283,7 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __devexit of_gpio_leds_remove(struct of_device *ofdev)
|
||||
static int __devexit of_gpio_leds_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct gpio_led_of_platform_data *pdata = dev_get_drvdata(&ofdev->dev);
|
||||
int i;
|
||||
|
|
|
@ -15,7 +15,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \
|
|||
static ssize_t
|
||||
compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct of_device *of;
|
||||
struct platform_device *of;
|
||||
const char *compat;
|
||||
int cplen;
|
||||
int length = 0;
|
||||
|
@ -52,9 +52,9 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
|
|||
static ssize_t devspec_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
|
||||
ofdev = to_of_device(dev);
|
||||
ofdev = to_platform_device(dev);
|
||||
return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ struct smu_cmd_buf {
|
|||
struct smu_device {
|
||||
spinlock_t lock;
|
||||
struct device_node *of_node;
|
||||
struct of_device *of_dev;
|
||||
struct platform_device *of_dev;
|
||||
int doorbell; /* doorbell gpio */
|
||||
u32 __iomem *db_buf; /* doorbell buffer */
|
||||
struct device_node *db_node;
|
||||
|
@ -645,7 +645,7 @@ static void smu_expose_childs(struct work_struct *unused)
|
|||
|
||||
static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs);
|
||||
|
||||
static int smu_platform_probe(struct of_device* dev,
|
||||
static int smu_platform_probe(struct platform_device* dev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
if (!smu)
|
||||
|
@ -695,7 +695,7 @@ static int __init smu_init_sysfs(void)
|
|||
|
||||
device_initcall(smu_init_sysfs);
|
||||
|
||||
struct of_device *smu_get_ofdev(void)
|
||||
struct platform_device *smu_get_ofdev(void)
|
||||
{
|
||||
if (!smu)
|
||||
return NULL;
|
||||
|
|
|
@ -84,7 +84,7 @@ struct thermostat {
|
|||
|
||||
static enum {ADT7460, ADT7467} therm_type;
|
||||
static int therm_bus, therm_address;
|
||||
static struct of_device * of_dev;
|
||||
static struct platform_device * of_dev;
|
||||
static struct thermostat* thermostat;
|
||||
static struct task_struct *thread_therm = NULL;
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
* Driver statics
|
||||
*/
|
||||
|
||||
static struct of_device * of_dev;
|
||||
static struct platform_device * of_dev;
|
||||
static struct i2c_adapter * u3_0;
|
||||
static struct i2c_adapter * u3_1;
|
||||
static struct i2c_adapter * k2;
|
||||
|
@ -2210,7 +2210,7 @@ static void fcu_lookup_fans(struct device_node *fcu_node)
|
|||
}
|
||||
}
|
||||
|
||||
static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
|
||||
static int fcu_of_probe(struct platform_device* dev, const struct of_device_id *match)
|
||||
{
|
||||
state = state_detached;
|
||||
|
||||
|
@ -2221,7 +2221,7 @@ static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
|
|||
return i2c_add_driver(&therm_pm72_driver);
|
||||
}
|
||||
|
||||
static int fcu_of_remove(struct of_device* dev)
|
||||
static int fcu_of_remove(struct platform_device* dev)
|
||||
{
|
||||
i2c_del_driver(&therm_pm72_driver);
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ static struct {
|
|||
struct task_struct *poll_task;
|
||||
|
||||
struct mutex lock;
|
||||
struct of_device *of_dev;
|
||||
struct platform_device *of_dev;
|
||||
|
||||
struct i2c_client *thermostat;
|
||||
struct i2c_client *fan;
|
||||
|
@ -444,13 +444,13 @@ static struct i2c_driver g4fan_driver = {
|
|||
/************************************************************************/
|
||||
|
||||
static int
|
||||
therm_of_probe( struct of_device *dev, const struct of_device_id *match )
|
||||
therm_of_probe( struct platform_device *dev, const struct of_device_id *match )
|
||||
{
|
||||
return i2c_add_driver( &g4fan_driver );
|
||||
}
|
||||
|
||||
static int
|
||||
therm_of_remove( struct of_device *dev )
|
||||
therm_of_remove( struct platform_device *dev )
|
||||
{
|
||||
i2c_del_driver( &g4fan_driver );
|
||||
return 0;
|
||||
|
|
|
@ -1418,7 +1418,7 @@ static struct video_device viu_template = {
|
|||
.current_norm = V4L2_STD_NTSC_M,
|
||||
};
|
||||
|
||||
static int __devinit viu_of_probe(struct of_device *op,
|
||||
static int __devinit viu_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct viu_dev *viu_dev;
|
||||
|
@ -1549,7 +1549,7 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __devexit viu_of_remove(struct of_device *op)
|
||||
static int __devexit viu_of_remove(struct platform_device *op)
|
||||
{
|
||||
struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
|
||||
struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev);
|
||||
|
@ -1570,7 +1570,7 @@ static int __devexit viu_of_remove(struct of_device *op)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int viu_suspend(struct of_device *op, pm_message_t state)
|
||||
static int viu_suspend(struct platform_device *op, pm_message_t state)
|
||||
{
|
||||
struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
|
||||
struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev);
|
||||
|
@ -1579,7 +1579,7 @@ static int viu_suspend(struct of_device *op, pm_message_t state)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int viu_resume(struct of_device *op)
|
||||
static int viu_resume(struct platform_device *op)
|
||||
{
|
||||
struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
|
||||
struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev);
|
||||
|
|
|
@ -1536,6 +1536,7 @@ static int __devexit mmc_spi_remove(struct spi_device *spi)
|
|||
#if defined(CONFIG_OF)
|
||||
static struct of_device_id mmc_spi_of_match_table[] __devinitdata = {
|
||||
{ .compatible = "mmc-spi-slot", },
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -85,14 +85,14 @@ void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg)
|
|||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
static int sdhci_of_suspend(struct of_device *ofdev, pm_message_t state)
|
||||
static int sdhci_of_suspend(struct platform_device *ofdev, pm_message_t state)
|
||||
{
|
||||
struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
return mmc_suspend_host(host->mmc);
|
||||
}
|
||||
|
||||
static int sdhci_of_resume(struct of_device *ofdev)
|
||||
static int sdhci_of_resume(struct platform_device *ofdev)
|
||||
{
|
||||
struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
@ -115,7 +115,7 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
|
|||
return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
|
||||
}
|
||||
|
||||
static int __devinit sdhci_of_probe(struct of_device *ofdev,
|
||||
static int __devinit sdhci_of_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
@ -183,7 +183,7 @@ err_addr_map:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __devexit sdhci_of_remove(struct of_device *ofdev)
|
||||
static int __devexit sdhci_of_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ struct of_flash {
|
|||
#ifdef CONFIG_MTD_PARTITIONS
|
||||
#define OF_FLASH_PARTS(info) ((info)->parts)
|
||||
|
||||
static int parse_obsolete_partitions(struct of_device *dev,
|
||||
static int parse_obsolete_partitions(struct platform_device *dev,
|
||||
struct of_flash *info,
|
||||
struct device_node *dp)
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ static int parse_obsolete_partitions(struct of_device *dev,
|
|||
#define parse_partitions(info, dev) (0)
|
||||
#endif /* MTD_PARTITIONS */
|
||||
|
||||
static int of_flash_remove(struct of_device *dev)
|
||||
static int of_flash_remove(struct platform_device *dev)
|
||||
{
|
||||
struct of_flash *info;
|
||||
int i;
|
||||
|
@ -140,7 +140,7 @@ static int of_flash_remove(struct of_device *dev)
|
|||
/* Helper function to handle probing of the obsolete "direct-mapped"
|
||||
* compatible binding, which has an extra "probe-type" property
|
||||
* describing the type of flash probe necessary. */
|
||||
static struct mtd_info * __devinit obsolete_probe(struct of_device *dev,
|
||||
static struct mtd_info * __devinit obsolete_probe(struct platform_device *dev,
|
||||
struct map_info *map)
|
||||
{
|
||||
struct device_node *dp = dev->dev.of_node;
|
||||
|
@ -215,7 +215,7 @@ static void __devinit of_free_probes(const char **probes)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int __devinit of_flash_probe(struct of_device *dev,
|
||||
static int __devinit of_flash_probe(struct platform_device *dev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
#ifdef CONFIG_MTD_PARTITIONS
|
||||
|
|
|
@ -48,7 +48,7 @@ struct map_info uflash_map_templ = {
|
|||
.bankwidth = UFLASH_BUSWIDTH,
|
||||
};
|
||||
|
||||
int uflash_devinit(struct of_device *op, struct device_node *dp)
|
||||
int uflash_devinit(struct platform_device *op, struct device_node *dp)
|
||||
{
|
||||
struct uflash_dev *up;
|
||||
|
||||
|
@ -108,7 +108,7 @@ int uflash_devinit(struct of_device *op, struct device_node *dp)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit uflash_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
|
||||
|
@ -121,7 +121,7 @@ static int __devinit uflash_probe(struct of_device *op, const struct of_device_i
|
|||
return uflash_devinit(op, dp);
|
||||
}
|
||||
|
||||
static int __devexit uflash_remove(struct of_device *op)
|
||||
static int __devexit uflash_remove(struct platform_device *op)
|
||||
{
|
||||
struct uflash_dev *up = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
|
|
@ -958,7 +958,7 @@ static int __devinit fsl_elbc_ctrl_init(struct fsl_elbc_ctrl *ctrl)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int fsl_elbc_ctrl_remove(struct of_device *ofdev)
|
||||
static int fsl_elbc_ctrl_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct fsl_elbc_ctrl *ctrl = dev_get_drvdata(&ofdev->dev);
|
||||
int i;
|
||||
|
@ -1013,7 +1013,7 @@ static irqreturn_t fsl_elbc_ctrl_irq(int irqno, void *data)
|
|||
* in the chip probe function.
|
||||
*/
|
||||
|
||||
static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev,
|
||||
static int __devinit fsl_elbc_ctrl_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *child;
|
||||
|
|
|
@ -217,7 +217,7 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __devinit fun_probe(struct of_device *ofdev,
|
||||
static int __devinit fun_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *ofid)
|
||||
{
|
||||
struct fsl_upm_nand *fun;
|
||||
|
@ -335,7 +335,7 @@ err1:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __devexit fun_remove(struct of_device *ofdev)
|
||||
static int __devexit fun_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct fsl_upm_nand *fun = dev_get_drvdata(&ofdev->dev);
|
||||
int i;
|
||||
|
|
|
@ -647,7 +647,7 @@ static void mpc5121_nfc_free(struct device *dev, struct mtd_info *mtd)
|
|||
iounmap(prv->csreg);
|
||||
}
|
||||
|
||||
static int __devinit mpc5121_nfc_probe(struct of_device *op,
|
||||
static int __devinit mpc5121_nfc_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *rootnode, *dn = op->dev.of_node;
|
||||
|
@ -869,7 +869,7 @@ error:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static int __devexit mpc5121_nfc_remove(struct of_device *op)
|
||||
static int __devexit mpc5121_nfc_remove(struct platform_device *op)
|
||||
{
|
||||
struct device *dev = &op->dev;
|
||||
struct mtd_info *mtd = dev_get_drvdata(dev);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
|
||||
struct ndfc_controller {
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
void __iomem *ndfcbase;
|
||||
struct mtd_info mtd;
|
||||
struct nand_chip chip;
|
||||
|
@ -225,7 +225,7 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __devinit ndfc_probe(struct of_device *ofdev,
|
||||
static int __devinit ndfc_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct ndfc_controller *ndfc = &ndfc_ctrl;
|
||||
|
@ -277,7 +277,7 @@ static int __devinit ndfc_probe(struct of_device *ofdev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devexit ndfc_remove(struct of_device *ofdev)
|
||||
static int __devexit ndfc_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct ndfc_controller *ndfc = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ int pasemi_device_ready(struct mtd_info *mtd)
|
|||
return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR);
|
||||
}
|
||||
|
||||
static int __devinit pasemi_nand_probe(struct of_device *ofdev,
|
||||
static int __devinit pasemi_nand_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
|
@ -185,7 +185,7 @@ static int __devinit pasemi_nand_probe(struct of_device *ofdev,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit pasemi_nand_remove(struct of_device *ofdev)
|
||||
static int __devexit pasemi_nand_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct nand_chip *chip;
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ static const char *part_probes[] = { "cmdlinepart", NULL };
|
|||
/*
|
||||
* Probe for the NAND device.
|
||||
*/
|
||||
static int __devinit socrates_nand_probe(struct of_device *ofdev,
|
||||
static int __devinit socrates_nand_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *ofid)
|
||||
{
|
||||
struct socrates_nand_host *host;
|
||||
|
@ -276,7 +276,7 @@ out:
|
|||
/*
|
||||
* Remove a NAND device.
|
||||
*/
|
||||
static int __devexit socrates_nand_remove(struct of_device *ofdev)
|
||||
static int __devexit socrates_nand_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev);
|
||||
struct mtd_info *mtd = &host->mtd;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
struct mpc5xxx_can_data {
|
||||
unsigned int type;
|
||||
u32 (*get_clock)(struct of_device *ofdev, const char *clock_name,
|
||||
u32 (*get_clock)(struct platform_device *ofdev, const char *clock_name,
|
||||
int *mscan_clksrc);
|
||||
};
|
||||
|
||||
|
@ -48,7 +48,7 @@ static struct of_device_id __devinitdata mpc52xx_cdm_ids[] = {
|
|||
{}
|
||||
};
|
||||
|
||||
static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
|
||||
static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev,
|
||||
const char *clock_name,
|
||||
int *mscan_clksrc)
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
|
|||
return freq;
|
||||
}
|
||||
#else /* !CONFIG_PPC_MPC52xx */
|
||||
static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
|
||||
static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev,
|
||||
const char *clock_name,
|
||||
int *mscan_clksrc)
|
||||
{
|
||||
|
@ -129,7 +129,7 @@ static struct of_device_id __devinitdata mpc512x_clock_ids[] = {
|
|||
{}
|
||||
};
|
||||
|
||||
static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
|
||||
static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
|
||||
const char *clock_name,
|
||||
int *mscan_clksrc)
|
||||
{
|
||||
|
@ -239,7 +239,7 @@ exit_unmap:
|
|||
return freq;
|
||||
}
|
||||
#else /* !CONFIG_PPC_MPC512x */
|
||||
static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
|
||||
static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
|
||||
const char *clock_name,
|
||||
int *mscan_clksrc)
|
||||
{
|
||||
|
@ -247,7 +247,7 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
|
|||
}
|
||||
#endif /* CONFIG_PPC_MPC512x */
|
||||
|
||||
static int __devinit mpc5xxx_can_probe(struct of_device *ofdev,
|
||||
static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *id)
|
||||
{
|
||||
struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data;
|
||||
|
@ -317,7 +317,7 @@ exit_unmap_mem:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit mpc5xxx_can_remove(struct of_device *ofdev)
|
||||
static int __devexit mpc5xxx_can_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct mscan_priv *priv = netdev_priv(dev);
|
||||
|
@ -334,7 +334,7 @@ static int __devexit mpc5xxx_can_remove(struct of_device *ofdev)
|
|||
|
||||
#ifdef CONFIG_PM
|
||||
static struct mscan_regs saved_regs;
|
||||
static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state)
|
||||
static int mpc5xxx_can_suspend(struct platform_device *ofdev, pm_message_t state)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct mscan_priv *priv = netdev_priv(dev);
|
||||
|
@ -345,7 +345,7 @@ static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int mpc5xxx_can_resume(struct of_device *ofdev)
|
||||
static int mpc5xxx_can_resume(struct platform_device *ofdev)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct mscan_priv *priv = netdev_priv(dev);
|
||||
|
|
|
@ -67,7 +67,7 @@ static void sja1000_ofp_write_reg(const struct sja1000_priv *priv,
|
|||
out_8(priv->reg_base + reg, val);
|
||||
}
|
||||
|
||||
static int __devexit sja1000_ofp_remove(struct of_device *ofdev)
|
||||
static int __devexit sja1000_ofp_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct sja1000_priv *priv = netdev_priv(dev);
|
||||
|
@ -87,7 +87,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit sja1000_ofp_probe(struct of_device *ofdev,
|
||||
static int __devinit sja1000_ofp_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *id)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
|
|
@ -413,7 +413,7 @@ struct ehea_port_res {
|
|||
|
||||
struct ehea_adapter {
|
||||
u64 handle;
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
struct ehea_port *port[EHEA_MAX_PORTS];
|
||||
struct ehea_eq *neq; /* notification event queue */
|
||||
struct tasklet_struct neq_tasklet;
|
||||
|
@ -465,7 +465,7 @@ struct ehea_port {
|
|||
struct net_device *netdev;
|
||||
struct net_device_stats stats;
|
||||
struct ehea_port_res port_res[EHEA_MAX_PORT_RES];
|
||||
struct of_device ofdev; /* Open Firmware Device */
|
||||
struct platform_device ofdev; /* Open Firmware Device */
|
||||
struct ehea_mc_list *mc_list; /* Multicast MAC addresses */
|
||||
struct vlan_group *vgrp;
|
||||
struct ehea_eq *qp_eq;
|
||||
|
|
|
@ -107,10 +107,10 @@ struct ehea_fw_handle_array ehea_fw_handles;
|
|||
struct ehea_bcmc_reg_array ehea_bcmc_regs;
|
||||
|
||||
|
||||
static int __devinit ehea_probe_adapter(struct of_device *dev,
|
||||
static int __devinit ehea_probe_adapter(struct platform_device *dev,
|
||||
const struct of_device_id *id);
|
||||
|
||||
static int __devexit ehea_remove(struct of_device *dev);
|
||||
static int __devexit ehea_remove(struct platform_device *dev);
|
||||
|
||||
static struct of_device_id ehea_device_table[] = {
|
||||
{
|
||||
|
@ -3376,7 +3376,7 @@ static ssize_t ehea_remove_port(struct device *dev,
|
|||
static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port);
|
||||
static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port);
|
||||
|
||||
int ehea_create_device_sysfs(struct of_device *dev)
|
||||
int ehea_create_device_sysfs(struct platform_device *dev)
|
||||
{
|
||||
int ret = device_create_file(&dev->dev, &dev_attr_probe_port);
|
||||
if (ret)
|
||||
|
@ -3387,13 +3387,13 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
void ehea_remove_device_sysfs(struct of_device *dev)
|
||||
void ehea_remove_device_sysfs(struct platform_device *dev)
|
||||
{
|
||||
device_remove_file(&dev->dev, &dev_attr_probe_port);
|
||||
device_remove_file(&dev->dev, &dev_attr_remove_port);
|
||||
}
|
||||
|
||||
static int __devinit ehea_probe_adapter(struct of_device *dev,
|
||||
static int __devinit ehea_probe_adapter(struct platform_device *dev,
|
||||
const struct of_device_id *id)
|
||||
{
|
||||
struct ehea_adapter *adapter;
|
||||
|
@ -3492,7 +3492,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __devexit ehea_remove(struct of_device *dev)
|
||||
static int __devexit ehea_remove(struct platform_device *dev)
|
||||
{
|
||||
struct ehea_adapter *adapter = dev_get_drvdata(&dev->dev);
|
||||
int i;
|
||||
|
|
|
@ -850,7 +850,7 @@ static const struct net_device_ops mpc52xx_fec_netdev_ops = {
|
|||
/* ======================================================================== */
|
||||
|
||||
static int __devinit
|
||||
mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
|
||||
mpc52xx_fec_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
int rv;
|
||||
struct net_device *ndev;
|
||||
|
@ -995,7 +995,7 @@ err_netdev:
|
|||
}
|
||||
|
||||
static int
|
||||
mpc52xx_fec_remove(struct of_device *op)
|
||||
mpc52xx_fec_remove(struct platform_device *op)
|
||||
{
|
||||
struct net_device *ndev;
|
||||
struct mpc52xx_fec_priv *priv;
|
||||
|
@ -1025,7 +1025,7 @@ mpc52xx_fec_remove(struct of_device *op)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int mpc52xx_fec_of_suspend(struct of_device *op, pm_message_t state)
|
||||
static int mpc52xx_fec_of_suspend(struct platform_device *op, pm_message_t state)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ static int mpc52xx_fec_of_suspend(struct of_device *op, pm_message_t state)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int mpc52xx_fec_of_resume(struct of_device *op)
|
||||
static int mpc52xx_fec_of_resume(struct platform_device *op)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg,
|
|||
data | FEC_MII_WRITE_FRAME);
|
||||
}
|
||||
|
||||
static int mpc52xx_fec_mdio_probe(struct of_device *of,
|
||||
static int mpc52xx_fec_mdio_probe(struct platform_device *of,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device *dev = &of->dev;
|
||||
|
@ -122,7 +122,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int mpc52xx_fec_mdio_remove(struct of_device *of)
|
||||
static int mpc52xx_fec_mdio_remove(struct platform_device *of)
|
||||
{
|
||||
struct device *dev = &of->dev;
|
||||
struct mii_bus *bus = dev_get_drvdata(dev);
|
||||
|
|
|
@ -997,7 +997,7 @@ static const struct net_device_ops fs_enet_netdev_ops = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int __devinit fs_enet_probe(struct of_device *ofdev,
|
||||
static int __devinit fs_enet_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct net_device *ndev;
|
||||
|
@ -1105,7 +1105,7 @@ out_free_fpi:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int fs_enet_remove(struct of_device *ofdev)
|
||||
static int fs_enet_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct net_device *ndev = dev_get_drvdata(&ofdev->dev);
|
||||
struct fs_enet_private *fep = netdev_priv(ndev);
|
||||
|
|
|
@ -84,7 +84,7 @@ static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op)
|
|||
|
||||
static int do_pd_setup(struct fs_enet_private *fep)
|
||||
{
|
||||
struct of_device *ofdev = to_of_device(fep->dev);
|
||||
struct platform_device *ofdev = to_platform_device(fep->dev);
|
||||
struct fs_platform_info *fpi = fep->fpi;
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ static int whack_reset(struct fec __iomem *fecp)
|
|||
|
||||
static int do_pd_setup(struct fs_enet_private *fep)
|
||||
{
|
||||
struct of_device *ofdev = to_of_device(fep->dev);
|
||||
struct platform_device *ofdev = to_platform_device(fep->dev);
|
||||
|
||||
fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
|
||||
if (fep->interrupt == NO_IRQ)
|
||||
|
|
|
@ -96,7 +96,7 @@ static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op)
|
|||
|
||||
static int do_pd_setup(struct fs_enet_private *fep)
|
||||
{
|
||||
struct of_device *ofdev = to_of_device(fep->dev);
|
||||
struct platform_device *ofdev = to_platform_device(fep->dev);
|
||||
|
||||
fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
|
||||
if (fep->interrupt == NO_IRQ)
|
||||
|
|
|
@ -150,7 +150,7 @@ static int __devinit fs_mii_bitbang_init(struct mii_bus *bus,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
|
||||
static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct mii_bus *new_bus;
|
||||
|
@ -200,7 +200,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int fs_enet_mdio_remove(struct of_device *ofdev)
|
||||
static int fs_enet_mdio_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct mii_bus *bus = dev_get_drvdata(&ofdev->dev);
|
||||
struct bb_info *bitbang = bus->priv;
|
||||
|
|
|
@ -101,7 +101,7 @@ static int fs_enet_fec_mii_reset(struct mii_bus *bus)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
|
||||
static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct resource res;
|
||||
|
@ -192,7 +192,7 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int fs_enet_mdio_remove(struct of_device *ofdev)
|
||||
static int fs_enet_mdio_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct mii_bus *bus = dev_get_drvdata(&ofdev->dev);
|
||||
struct fec_info *fec = bus->priv;
|
||||
|
|
|
@ -265,7 +265,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
|
|||
#endif
|
||||
|
||||
|
||||
static int fsl_pq_mdio_probe(struct of_device *ofdev,
|
||||
static int fsl_pq_mdio_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
@ -425,7 +425,7 @@ err_free_priv:
|
|||
}
|
||||
|
||||
|
||||
static int fsl_pq_mdio_remove(struct of_device *ofdev)
|
||||
static int fsl_pq_mdio_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct device *device = &ofdev->dev;
|
||||
struct mii_bus *bus = dev_get_drvdata(device);
|
||||
|
|
|
@ -122,9 +122,9 @@ static irqreturn_t gfar_interrupt(int irq, void *dev_id);
|
|||
static void adjust_link(struct net_device *dev);
|
||||
static void init_registers(struct net_device *dev);
|
||||
static int init_phy(struct net_device *dev);
|
||||
static int gfar_probe(struct of_device *ofdev,
|
||||
static int gfar_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match);
|
||||
static int gfar_remove(struct of_device *ofdev);
|
||||
static int gfar_remove(struct platform_device *ofdev);
|
||||
static void free_skb_resources(struct gfar_private *priv);
|
||||
static void gfar_set_multi(struct net_device *dev);
|
||||
static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr);
|
||||
|
@ -605,7 +605,7 @@ static int gfar_parse_group(struct device_node *np,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
|
||||
static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
|
||||
{
|
||||
const char *model;
|
||||
const char *ctype;
|
||||
|
@ -959,7 +959,7 @@ static void gfar_detect_errata(struct gfar_private *priv)
|
|||
|
||||
/* Set up the ethernet device structure, private data,
|
||||
* and anything else we need before we start */
|
||||
static int gfar_probe(struct of_device *ofdev,
|
||||
static int gfar_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
u32 tempval;
|
||||
|
@ -1238,7 +1238,7 @@ register_fail:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int gfar_remove(struct of_device *ofdev)
|
||||
static int gfar_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct gfar_private *priv = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -1054,7 +1054,7 @@ struct gfar_private {
|
|||
|
||||
struct device_node *node;
|
||||
struct net_device *ndev;
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
enum gfar_errata errata;
|
||||
|
||||
struct gfar_priv_grp gfargrp[MAXGROUPS];
|
||||
|
|
|
@ -1373,7 +1373,7 @@ error:
|
|||
}
|
||||
|
||||
/* Initialize the GRETH MAC */
|
||||
static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_device_id *match)
|
||||
static int __devinit greth_of_probe(struct platform_device *ofdev, const struct of_device_id *match)
|
||||
{
|
||||
struct net_device *dev;
|
||||
struct greth_private *greth;
|
||||
|
@ -1412,7 +1412,7 @@ static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_dev
|
|||
}
|
||||
|
||||
regs = (struct greth_regs *) greth->regs;
|
||||
greth->irq = ofdev->irqs[0];
|
||||
greth->irq = ofdev->archdata.irqs[0];
|
||||
|
||||
dev_set_drvdata(greth->dev, dev);
|
||||
SET_NETDEV_DEV(dev, greth->dev);
|
||||
|
@ -1572,7 +1572,7 @@ error1:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit greth_of_remove(struct of_device *of_dev)
|
||||
static int __devexit greth_of_remove(struct platform_device *of_dev)
|
||||
{
|
||||
struct net_device *ndev = dev_get_drvdata(&of_dev->dev);
|
||||
struct greth_private *greth = netdev_priv(ndev);
|
||||
|
|
|
@ -118,7 +118,7 @@ struct greth_private {
|
|||
|
||||
int irq;
|
||||
|
||||
struct device *dev; /* Pointer to of_device->dev */
|
||||
struct device *dev; /* Pointer to platform_device->dev */
|
||||
struct net_device *netdev;
|
||||
struct napi_struct napi;
|
||||
spinlock_t devlock;
|
||||
|
|
|
@ -2245,7 +2245,7 @@ static int emac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
|
|||
struct emac_depentry {
|
||||
u32 phandle;
|
||||
struct device_node *node;
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
void *drvdata;
|
||||
};
|
||||
|
||||
|
@ -2719,7 +2719,7 @@ static const struct net_device_ops emac_gige_netdev_ops = {
|
|||
.ndo_change_mtu = emac_change_mtu,
|
||||
};
|
||||
|
||||
static int __devinit emac_probe(struct of_device *ofdev,
|
||||
static int __devinit emac_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct net_device *ndev;
|
||||
|
@ -2941,7 +2941,7 @@ static int __devinit emac_probe(struct of_device *ofdev,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit emac_remove(struct of_device *ofdev)
|
||||
static int __devexit emac_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct emac_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -170,12 +170,12 @@ struct emac_instance {
|
|||
struct net_device *ndev;
|
||||
struct resource rsrc_regs;
|
||||
struct emac_regs __iomem *emacp;
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
struct device_node **blist; /* bootlist entry */
|
||||
|
||||
/* MAL linkage */
|
||||
u32 mal_ph;
|
||||
struct of_device *mal_dev;
|
||||
struct platform_device *mal_dev;
|
||||
u32 mal_rx_chan;
|
||||
u32 mal_tx_chan;
|
||||
struct mal_instance *mal;
|
||||
|
@ -196,24 +196,24 @@ struct emac_instance {
|
|||
|
||||
/* Shared MDIO if any */
|
||||
u32 mdio_ph;
|
||||
struct of_device *mdio_dev;
|
||||
struct platform_device *mdio_dev;
|
||||
struct emac_instance *mdio_instance;
|
||||
struct mutex mdio_lock;
|
||||
|
||||
/* ZMII infos if any */
|
||||
u32 zmii_ph;
|
||||
u32 zmii_port;
|
||||
struct of_device *zmii_dev;
|
||||
struct platform_device *zmii_dev;
|
||||
|
||||
/* RGMII infos if any */
|
||||
u32 rgmii_ph;
|
||||
u32 rgmii_port;
|
||||
struct of_device *rgmii_dev;
|
||||
struct platform_device *rgmii_dev;
|
||||
|
||||
/* TAH infos if any */
|
||||
u32 tah_ph;
|
||||
u32 tah_port;
|
||||
struct of_device *tah_dev;
|
||||
struct platform_device *tah_dev;
|
||||
|
||||
/* IRQs */
|
||||
int wol_irq;
|
||||
|
|
|
@ -517,7 +517,7 @@ void *mal_dump_regs(struct mal_instance *mal, void *buf)
|
|||
return regs + 1;
|
||||
}
|
||||
|
||||
static int __devinit mal_probe(struct of_device *ofdev,
|
||||
static int __devinit mal_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct mal_instance *mal;
|
||||
|
@ -730,7 +730,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit mal_remove(struct of_device *ofdev)
|
||||
static int __devexit mal_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct mal_instance *mal = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ struct mal_instance {
|
|||
dma_addr_t bd_dma;
|
||||
struct mal_descriptor *bd_virt;
|
||||
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
int index;
|
||||
spinlock_t lock;
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ static inline u32 rgmii_mode_mask(int mode, int input)
|
|||
}
|
||||
}
|
||||
|
||||
int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode)
|
||||
int __devinit rgmii_attach(struct platform_device *ofdev, int input, int mode)
|
||||
{
|
||||
struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct rgmii_regs __iomem *p = dev->base;
|
||||
|
@ -122,7 +122,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void rgmii_set_speed(struct of_device *ofdev, int input, int speed)
|
||||
void rgmii_set_speed(struct platform_device *ofdev, int input, int speed)
|
||||
{
|
||||
struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct rgmii_regs __iomem *p = dev->base;
|
||||
|
@ -144,7 +144,7 @@ void rgmii_set_speed(struct of_device *ofdev, int input, int speed)
|
|||
mutex_unlock(&dev->lock);
|
||||
}
|
||||
|
||||
void rgmii_get_mdio(struct of_device *ofdev, int input)
|
||||
void rgmii_get_mdio(struct platform_device *ofdev, int input)
|
||||
{
|
||||
struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct rgmii_regs __iomem *p = dev->base;
|
||||
|
@ -165,7 +165,7 @@ void rgmii_get_mdio(struct of_device *ofdev, int input)
|
|||
DBG2(dev, " fer = 0x%08x\n", fer);
|
||||
}
|
||||
|
||||
void rgmii_put_mdio(struct of_device *ofdev, int input)
|
||||
void rgmii_put_mdio(struct platform_device *ofdev, int input)
|
||||
{
|
||||
struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct rgmii_regs __iomem *p = dev->base;
|
||||
|
@ -186,7 +186,7 @@ void rgmii_put_mdio(struct of_device *ofdev, int input)
|
|||
mutex_unlock(&dev->lock);
|
||||
}
|
||||
|
||||
void rgmii_detach(struct of_device *ofdev, int input)
|
||||
void rgmii_detach(struct platform_device *ofdev, int input)
|
||||
{
|
||||
struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct rgmii_regs __iomem *p;
|
||||
|
@ -206,13 +206,13 @@ void rgmii_detach(struct of_device *ofdev, int input)
|
|||
mutex_unlock(&dev->lock);
|
||||
}
|
||||
|
||||
int rgmii_get_regs_len(struct of_device *ofdev)
|
||||
int rgmii_get_regs_len(struct platform_device *ofdev)
|
||||
{
|
||||
return sizeof(struct emac_ethtool_regs_subhdr) +
|
||||
sizeof(struct rgmii_regs);
|
||||
}
|
||||
|
||||
void *rgmii_dump_regs(struct of_device *ofdev, void *buf)
|
||||
void *rgmii_dump_regs(struct platform_device *ofdev, void *buf)
|
||||
{
|
||||
struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct emac_ethtool_regs_subhdr *hdr = buf;
|
||||
|
@ -228,7 +228,7 @@ void *rgmii_dump_regs(struct of_device *ofdev, void *buf)
|
|||
}
|
||||
|
||||
|
||||
static int __devinit rgmii_probe(struct of_device *ofdev,
|
||||
static int __devinit rgmii_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
@ -293,7 +293,7 @@ static int __devinit rgmii_probe(struct of_device *ofdev,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int __devexit rgmii_remove(struct of_device *ofdev)
|
||||
static int __devexit rgmii_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -51,20 +51,20 @@ struct rgmii_instance {
|
|||
int users;
|
||||
|
||||
/* OF device instance */
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_IBM_NEW_EMAC_RGMII
|
||||
|
||||
extern int rgmii_init(void);
|
||||
extern void rgmii_exit(void);
|
||||
extern int rgmii_attach(struct of_device *ofdev, int input, int mode);
|
||||
extern void rgmii_detach(struct of_device *ofdev, int input);
|
||||
extern void rgmii_get_mdio(struct of_device *ofdev, int input);
|
||||
extern void rgmii_put_mdio(struct of_device *ofdev, int input);
|
||||
extern void rgmii_set_speed(struct of_device *ofdev, int input, int speed);
|
||||
extern int rgmii_get_regs_len(struct of_device *ofdev);
|
||||
extern void *rgmii_dump_regs(struct of_device *ofdev, void *buf);
|
||||
extern int rgmii_attach(struct platform_device *ofdev, int input, int mode);
|
||||
extern void rgmii_detach(struct platform_device *ofdev, int input);
|
||||
extern void rgmii_get_mdio(struct platform_device *ofdev, int input);
|
||||
extern void rgmii_put_mdio(struct platform_device *ofdev, int input);
|
||||
extern void rgmii_set_speed(struct platform_device *ofdev, int input, int speed);
|
||||
extern int rgmii_get_regs_len(struct platform_device *ofdev);
|
||||
extern void *rgmii_dump_regs(struct platform_device *ofdev, void *buf);
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "emac.h"
|
||||
#include "core.h"
|
||||
|
||||
int __devinit tah_attach(struct of_device *ofdev, int channel)
|
||||
int __devinit tah_attach(struct platform_device *ofdev, int channel)
|
||||
{
|
||||
struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
@ -35,7 +35,7 @@ int __devinit tah_attach(struct of_device *ofdev, int channel)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void tah_detach(struct of_device *ofdev, int channel)
|
||||
void tah_detach(struct platform_device *ofdev, int channel)
|
||||
{
|
||||
struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
@ -44,7 +44,7 @@ void tah_detach(struct of_device *ofdev, int channel)
|
|||
mutex_unlock(&dev->lock);
|
||||
}
|
||||
|
||||
void tah_reset(struct of_device *ofdev)
|
||||
void tah_reset(struct platform_device *ofdev)
|
||||
{
|
||||
struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct tah_regs __iomem *p = dev->base;
|
||||
|
@ -66,13 +66,13 @@ void tah_reset(struct of_device *ofdev)
|
|||
TAH_MR_DIG);
|
||||
}
|
||||
|
||||
int tah_get_regs_len(struct of_device *ofdev)
|
||||
int tah_get_regs_len(struct platform_device *ofdev)
|
||||
{
|
||||
return sizeof(struct emac_ethtool_regs_subhdr) +
|
||||
sizeof(struct tah_regs);
|
||||
}
|
||||
|
||||
void *tah_dump_regs(struct of_device *ofdev, void *buf)
|
||||
void *tah_dump_regs(struct platform_device *ofdev, void *buf)
|
||||
{
|
||||
struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct emac_ethtool_regs_subhdr *hdr = buf;
|
||||
|
@ -87,7 +87,7 @@ void *tah_dump_regs(struct of_device *ofdev, void *buf)
|
|||
return regs + 1;
|
||||
}
|
||||
|
||||
static int __devinit tah_probe(struct of_device *ofdev,
|
||||
static int __devinit tah_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
@ -139,7 +139,7 @@ static int __devinit tah_probe(struct of_device *ofdev,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int __devexit tah_remove(struct of_device *ofdev)
|
||||
static int __devexit tah_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ struct tah_instance {
|
|||
int users;
|
||||
|
||||
/* OF device instance */
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
};
|
||||
|
||||
|
||||
|
@ -74,11 +74,11 @@ struct tah_instance {
|
|||
|
||||
extern int tah_init(void);
|
||||
extern void tah_exit(void);
|
||||
extern int tah_attach(struct of_device *ofdev, int channel);
|
||||
extern void tah_detach(struct of_device *ofdev, int channel);
|
||||
extern void tah_reset(struct of_device *ofdev);
|
||||
extern int tah_get_regs_len(struct of_device *ofdev);
|
||||
extern void *tah_dump_regs(struct of_device *ofdev, void *buf);
|
||||
extern int tah_attach(struct platform_device *ofdev, int channel);
|
||||
extern void tah_detach(struct platform_device *ofdev, int channel);
|
||||
extern void tah_reset(struct platform_device *ofdev);
|
||||
extern int tah_get_regs_len(struct platform_device *ofdev);
|
||||
extern void *tah_dump_regs(struct platform_device *ofdev, void *buf);
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ static inline u32 zmii_mode_mask(int mode, int input)
|
|||
}
|
||||
}
|
||||
|
||||
int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode)
|
||||
int __devinit zmii_attach(struct platform_device *ofdev, int input, int *mode)
|
||||
{
|
||||
struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct zmii_regs __iomem *p = dev->base;
|
||||
|
@ -148,7 +148,7 @@ int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void zmii_get_mdio(struct of_device *ofdev, int input)
|
||||
void zmii_get_mdio(struct platform_device *ofdev, int input)
|
||||
{
|
||||
struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
u32 fer;
|
||||
|
@ -161,7 +161,7 @@ void zmii_get_mdio(struct of_device *ofdev, int input)
|
|||
out_be32(&dev->base->fer, fer | ZMII_FER_MDI(input));
|
||||
}
|
||||
|
||||
void zmii_put_mdio(struct of_device *ofdev, int input)
|
||||
void zmii_put_mdio(struct platform_device *ofdev, int input)
|
||||
{
|
||||
struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
@ -170,7 +170,7 @@ void zmii_put_mdio(struct of_device *ofdev, int input)
|
|||
}
|
||||
|
||||
|
||||
void zmii_set_speed(struct of_device *ofdev, int input, int speed)
|
||||
void zmii_set_speed(struct platform_device *ofdev, int input, int speed)
|
||||
{
|
||||
struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
u32 ssr;
|
||||
|
@ -191,7 +191,7 @@ void zmii_set_speed(struct of_device *ofdev, int input, int speed)
|
|||
mutex_unlock(&dev->lock);
|
||||
}
|
||||
|
||||
void zmii_detach(struct of_device *ofdev, int input)
|
||||
void zmii_detach(struct platform_device *ofdev, int input)
|
||||
{
|
||||
struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
@ -210,13 +210,13 @@ void zmii_detach(struct of_device *ofdev, int input)
|
|||
mutex_unlock(&dev->lock);
|
||||
}
|
||||
|
||||
int zmii_get_regs_len(struct of_device *ofdev)
|
||||
int zmii_get_regs_len(struct platform_device *ofdev)
|
||||
{
|
||||
return sizeof(struct emac_ethtool_regs_subhdr) +
|
||||
sizeof(struct zmii_regs);
|
||||
}
|
||||
|
||||
void *zmii_dump_regs(struct of_device *ofdev, void *buf)
|
||||
void *zmii_dump_regs(struct platform_device *ofdev, void *buf)
|
||||
{
|
||||
struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
struct emac_ethtool_regs_subhdr *hdr = buf;
|
||||
|
@ -231,7 +231,7 @@ void *zmii_dump_regs(struct of_device *ofdev, void *buf)
|
|||
return regs + 1;
|
||||
}
|
||||
|
||||
static int __devinit zmii_probe(struct of_device *ofdev,
|
||||
static int __devinit zmii_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
@ -286,7 +286,7 @@ static int __devinit zmii_probe(struct of_device *ofdev,
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int __devexit zmii_remove(struct of_device *ofdev)
|
||||
static int __devexit zmii_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
|
||||
|
||||
|
|
|
@ -48,20 +48,20 @@ struct zmii_instance {
|
|||
u32 fer_save;
|
||||
|
||||
/* OF device instance */
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_IBM_NEW_EMAC_ZMII
|
||||
|
||||
extern int zmii_init(void);
|
||||
extern void zmii_exit(void);
|
||||
extern int zmii_attach(struct of_device *ofdev, int input, int *mode);
|
||||
extern void zmii_detach(struct of_device *ofdev, int input);
|
||||
extern void zmii_get_mdio(struct of_device *ofdev, int input);
|
||||
extern void zmii_put_mdio(struct of_device *ofdev, int input);
|
||||
extern void zmii_set_speed(struct of_device *ofdev, int input, int speed);
|
||||
extern int zmii_get_regs_len(struct of_device *ocpdev);
|
||||
extern void *zmii_dump_regs(struct of_device *ofdev, void *buf);
|
||||
extern int zmii_attach(struct platform_device *ofdev, int input, int *mode);
|
||||
extern void zmii_detach(struct platform_device *ofdev, int input);
|
||||
extern void zmii_get_mdio(struct platform_device *ofdev, int input);
|
||||
extern void zmii_put_mdio(struct platform_device *ofdev, int input);
|
||||
extern void zmii_set_speed(struct platform_device *ofdev, int input, int speed);
|
||||
extern int zmii_get_regs_len(struct platform_device *ocpdev);
|
||||
extern void *zmii_dump_regs(struct platform_device *ofdev, void *buf);
|
||||
|
||||
#else
|
||||
# define zmii_init() 0
|
||||
|
|
|
@ -159,7 +159,7 @@ static void temac_dma_dcr_out(struct temac_local *lp, int reg, u32 value)
|
|||
* temac_dcr_setup - If the DMA is DCR based, then setup the address and
|
||||
* I/O functions
|
||||
*/
|
||||
static int temac_dcr_setup(struct temac_local *lp, struct of_device *op,
|
||||
static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op,
|
||||
struct device_node *np)
|
||||
{
|
||||
unsigned int dcrs;
|
||||
|
@ -184,7 +184,7 @@ static int temac_dcr_setup(struct temac_local *lp, struct of_device *op,
|
|||
* temac_dcr_setup - This is a stub for when DCR is not supported,
|
||||
* such as with MicroBlaze
|
||||
*/
|
||||
static int temac_dcr_setup(struct temac_local *lp, struct of_device *op,
|
||||
static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op,
|
||||
struct device_node *np)
|
||||
{
|
||||
return -1;
|
||||
|
@ -952,7 +952,7 @@ static const struct attribute_group temac_attr_group = {
|
|||
};
|
||||
|
||||
static int __init
|
||||
temac_of_probe(struct of_device *op, const struct of_device_id *match)
|
||||
temac_of_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np;
|
||||
struct temac_local *lp;
|
||||
|
@ -1094,7 +1094,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int __devexit temac_of_remove(struct of_device *op)
|
||||
static int __devexit temac_of_remove(struct platform_device *op)
|
||||
{
|
||||
struct net_device *ndev = dev_get_drvdata(&op->dev);
|
||||
struct temac_local *lp = netdev_priv(ndev);
|
||||
|
|
|
@ -926,7 +926,7 @@ static const struct net_device_ops myri_ops = {
|
|||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
||||
static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit myri_sbus_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
static unsigned version_printed;
|
||||
|
@ -1124,7 +1124,7 @@ err:
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int __devexit myri_sbus_remove(struct of_device *op)
|
||||
static int __devexit myri_sbus_remove(struct platform_device *op)
|
||||
{
|
||||
struct myri_eth *mp = dev_get_drvdata(&op->dev);
|
||||
struct net_device *net_dev = mp->dev;
|
||||
|
|
|
@ -288,7 +288,7 @@ struct myri_eth {
|
|||
struct myri_eeprom eeprom; /* Local copy of EEPROM. */
|
||||
unsigned int reg_size; /* Size of register space. */
|
||||
unsigned int shmem_base; /* Offset to shared ram. */
|
||||
struct of_device *myri_op; /* Our OF device struct. */
|
||||
struct platform_device *myri_op; /* Our OF device struct. */
|
||||
};
|
||||
|
||||
/* We use this to acquire receive skb's that we can DMA directly into. */
|
||||
|
|
|
@ -9103,7 +9103,7 @@ retry:
|
|||
static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map)
|
||||
{
|
||||
#ifdef CONFIG_SPARC64
|
||||
struct of_device *op = np->op;
|
||||
struct platform_device *op = np->op;
|
||||
const u32 *int_prop;
|
||||
int i;
|
||||
|
||||
|
@ -9688,7 +9688,7 @@ static void __devinit niu_driver_version(void)
|
|||
|
||||
static struct net_device * __devinit niu_alloc_and_init(
|
||||
struct device *gen_dev, struct pci_dev *pdev,
|
||||
struct of_device *op, const struct niu_ops *ops,
|
||||
struct platform_device *op, const struct niu_ops *ops,
|
||||
u8 port)
|
||||
{
|
||||
struct net_device *dev;
|
||||
|
@ -10064,7 +10064,7 @@ static const struct niu_ops niu_phys_ops = {
|
|||
.unmap_single = niu_phys_unmap_single,
|
||||
};
|
||||
|
||||
static int __devinit niu_of_probe(struct of_device *op,
|
||||
static int __devinit niu_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
union niu_parent_id parent_id;
|
||||
|
@ -10179,7 +10179,7 @@ err_out:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit niu_of_remove(struct of_device *op)
|
||||
static int __devexit niu_of_remove(struct platform_device *op)
|
||||
{
|
||||
struct net_device *dev = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ static int __devexit mdio_gpio_remove(struct platform_device *pdev)
|
|||
|
||||
#ifdef CONFIG_OF_GPIO
|
||||
|
||||
static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
|
||||
static int __devinit mdio_ofgpio_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct mdio_gpio_platform_data *pdata;
|
||||
|
@ -224,7 +224,7 @@ out_free:
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int __devexit mdio_ofgpio_remove(struct of_device *ofdev)
|
||||
static int __devexit mdio_ofgpio_remove(struct platform_device *ofdev)
|
||||
{
|
||||
mdio_gpio_bus_destroy(&ofdev->dev);
|
||||
kfree(ofdev->dev.platform_data);
|
||||
|
|
|
@ -97,7 +97,7 @@ static int qec_global_reset(void __iomem *gregs)
|
|||
|
||||
static void qec_init(struct bigmac *bp)
|
||||
{
|
||||
struct of_device *qec_op = bp->qec_op;
|
||||
struct platform_device *qec_op = bp->qec_op;
|
||||
void __iomem *gregs = bp->gregs;
|
||||
u8 bsizes = bp->bigmac_bursts;
|
||||
u32 regval;
|
||||
|
@ -1083,8 +1083,8 @@ static const struct net_device_ops bigmac_ops = {
|
|||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
||||
static int __devinit bigmac_ether_init(struct of_device *op,
|
||||
struct of_device *qec_op)
|
||||
static int __devinit bigmac_ether_init(struct platform_device *op,
|
||||
struct platform_device *qec_op)
|
||||
{
|
||||
static int version_printed;
|
||||
struct net_device *dev;
|
||||
|
@ -1242,25 +1242,25 @@ fail_and_cleanup:
|
|||
/* QEC can be the parent of either QuadEthernet or a BigMAC. We want
|
||||
* the latter.
|
||||
*/
|
||||
static int __devinit bigmac_sbus_probe(struct of_device *op,
|
||||
static int __devinit bigmac_sbus_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device *parent = op->dev.parent;
|
||||
struct of_device *qec_op;
|
||||
struct platform_device *qec_op;
|
||||
|
||||
qec_op = to_of_device(parent);
|
||||
qec_op = to_platform_device(parent);
|
||||
|
||||
return bigmac_ether_init(op, qec_op);
|
||||
}
|
||||
|
||||
static int __devexit bigmac_sbus_remove(struct of_device *op)
|
||||
static int __devexit bigmac_sbus_remove(struct platform_device *op)
|
||||
{
|
||||
struct bigmac *bp = dev_get_drvdata(&op->dev);
|
||||
struct device *parent = op->dev.parent;
|
||||
struct net_device *net_dev = bp->dev;
|
||||
struct of_device *qec_op;
|
||||
struct platform_device *qec_op;
|
||||
|
||||
qec_op = to_of_device(parent);
|
||||
qec_op = to_platform_device(parent);
|
||||
|
||||
unregister_netdev(net_dev);
|
||||
|
||||
|
|
|
@ -329,8 +329,8 @@ struct bigmac {
|
|||
unsigned int timer_ticks;
|
||||
|
||||
struct net_device_stats enet_stats;
|
||||
struct of_device *qec_op;
|
||||
struct of_device *bigmac_op;
|
||||
struct platform_device *qec_op;
|
||||
struct platform_device *bigmac_op;
|
||||
struct net_device *dev;
|
||||
};
|
||||
|
||||
|
|
|
@ -1591,7 +1591,7 @@ static int happy_meal_init(struct happy_meal *hp)
|
|||
*/
|
||||
#ifdef CONFIG_SBUS
|
||||
if ((hp->happy_flags & HFLAG_PCI) == 0) {
|
||||
struct of_device *op = hp->happy_dev;
|
||||
struct platform_device *op = hp->happy_dev;
|
||||
if (sbus_can_dma_64bit()) {
|
||||
sbus_set_sbus64(&op->dev,
|
||||
hp->happy_bursts);
|
||||
|
@ -2480,7 +2480,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info
|
|||
#ifdef CONFIG_SBUS
|
||||
else {
|
||||
const struct linux_prom_registers *regs;
|
||||
struct of_device *op = hp->happy_dev;
|
||||
struct platform_device *op = hp->happy_dev;
|
||||
regs = of_get_property(op->dev.of_node, "regs", NULL);
|
||||
if (regs)
|
||||
sprintf(info->bus_info, "SBUS:%d",
|
||||
|
@ -2515,13 +2515,13 @@ static int hme_version_printed;
|
|||
*
|
||||
* Return NULL on failure.
|
||||
*/
|
||||
static struct quattro * __devinit quattro_sbus_find(struct of_device *child)
|
||||
static struct quattro * __devinit quattro_sbus_find(struct platform_device *child)
|
||||
{
|
||||
struct device *parent = child->dev.parent;
|
||||
struct of_device *op;
|
||||
struct platform_device *op;
|
||||
struct quattro *qp;
|
||||
|
||||
op = to_of_device(parent);
|
||||
op = to_platform_device(parent);
|
||||
qp = dev_get_drvdata(&op->dev);
|
||||
if (qp)
|
||||
return qp;
|
||||
|
@ -2551,7 +2551,7 @@ static int __init quattro_sbus_register_irqs(void)
|
|||
struct quattro *qp;
|
||||
|
||||
for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
|
||||
struct of_device *op = qp->quattro_dev;
|
||||
struct platform_device *op = qp->quattro_dev;
|
||||
int err, qfe_slot, skip = 0;
|
||||
|
||||
for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
|
||||
|
@ -2580,7 +2580,7 @@ static void quattro_sbus_free_irqs(void)
|
|||
struct quattro *qp;
|
||||
|
||||
for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
|
||||
struct of_device *op = qp->quattro_dev;
|
||||
struct platform_device *op = qp->quattro_dev;
|
||||
int qfe_slot, skip = 0;
|
||||
|
||||
for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
|
||||
|
@ -2639,7 +2639,7 @@ static const struct net_device_ops hme_netdev_ops = {
|
|||
};
|
||||
|
||||
#ifdef CONFIG_SBUS
|
||||
static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe)
|
||||
static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node, *sbus_dp;
|
||||
struct quattro *qp = NULL;
|
||||
|
@ -2648,7 +2648,7 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe)
|
|||
int i, qfe_slot = -1;
|
||||
int err = -ENODEV;
|
||||
|
||||
sbus_dp = to_of_device(op->dev.parent)->dev.of_node;
|
||||
sbus_dp = op->dev.parent->of_node;
|
||||
|
||||
/* We can match PCI devices too, do not accept those here. */
|
||||
if (strcmp(sbus_dp->name, "sbus"))
|
||||
|
@ -3235,7 +3235,7 @@ static void happy_meal_pci_exit(void)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_SBUS
|
||||
static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit hme_sbus_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
const char *model = of_get_property(dp, "model", NULL);
|
||||
|
@ -3247,7 +3247,7 @@ static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device
|
|||
return happy_meal_sbus_probe_one(op, is_qfe);
|
||||
}
|
||||
|
||||
static int __devexit hme_sbus_remove(struct of_device *op)
|
||||
static int __devexit hme_sbus_remove(struct platform_device *op)
|
||||
{
|
||||
struct happy_meal *hp = dev_get_drvdata(&op->dev);
|
||||
struct net_device *net_dev = hp->dev;
|
||||
|
|
|
@ -407,7 +407,7 @@ struct happy_meal {
|
|||
void (*write_rxd)(struct happy_meal_rxd *, u32, u32);
|
||||
#endif
|
||||
|
||||
/* This is either an of_device or a pci_dev. */
|
||||
/* This is either an platform_device or a pci_dev. */
|
||||
void *happy_dev;
|
||||
struct device *dma_dev;
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ struct lance_private {
|
|||
int rx_new, tx_new;
|
||||
int rx_old, tx_old;
|
||||
|
||||
struct of_device *ledma; /* If set this points to ledma */
|
||||
struct platform_device *ledma; /* If set this points to ledma */
|
||||
char tpe; /* cable-selection is TPE */
|
||||
char auto_select; /* cable-selection by carrier */
|
||||
char burst_sizes; /* ledma SBus burst sizes */
|
||||
|
@ -265,8 +265,8 @@ struct lance_private {
|
|||
char *name;
|
||||
dma_addr_t init_block_dvma;
|
||||
struct net_device *dev; /* Backpointer */
|
||||
struct of_device *op;
|
||||
struct of_device *lebuffer;
|
||||
struct platform_device *op;
|
||||
struct platform_device *lebuffer;
|
||||
struct timer_list multicast_timer;
|
||||
};
|
||||
|
||||
|
@ -1272,7 +1272,7 @@ static void lance_free_hwresources(struct lance_private *lp)
|
|||
if (lp->lregs)
|
||||
of_iounmap(&lp->op->resource[0], lp->lregs, LANCE_REG_SIZE);
|
||||
if (lp->dregs) {
|
||||
struct of_device *ledma = lp->ledma;
|
||||
struct platform_device *ledma = lp->ledma;
|
||||
|
||||
of_iounmap(&ledma->resource[0], lp->dregs,
|
||||
resource_size(&ledma->resource[0]));
|
||||
|
@ -1319,9 +1319,9 @@ static const struct net_device_ops sparc_lance_ops = {
|
|||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
||||
static int __devinit sparc_lance_probe_one(struct of_device *op,
|
||||
struct of_device *ledma,
|
||||
struct of_device *lebuffer)
|
||||
static int __devinit sparc_lance_probe_one(struct platform_device *op,
|
||||
struct platform_device *ledma,
|
||||
struct platform_device *lebuffer)
|
||||
{
|
||||
struct device_node *dp = op->dev.of_node;
|
||||
static unsigned version_printed;
|
||||
|
@ -1503,9 +1503,9 @@ fail:
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit sunlance_sbus_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct of_device *parent = to_of_device(op->dev.parent);
|
||||
struct platform_device *parent = to_platform_device(op->dev.parent);
|
||||
struct device_node *parent_dp = parent->dev.of_node;
|
||||
int err;
|
||||
|
||||
|
@ -1519,7 +1519,7 @@ static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_d
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit sunlance_sbus_remove(struct of_device *op)
|
||||
static int __devexit sunlance_sbus_remove(struct platform_device *op)
|
||||
{
|
||||
struct lance_private *lp = dev_get_drvdata(&op->dev);
|
||||
struct net_device *net_dev = lp->dev;
|
||||
|
|
|
@ -689,7 +689,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
|
|||
{
|
||||
const struct linux_prom_registers *regs;
|
||||
struct sunqe *qep = netdev_priv(dev);
|
||||
struct of_device *op;
|
||||
struct platform_device *op;
|
||||
|
||||
strcpy(info->driver, "sunqe");
|
||||
strcpy(info->version, "3.0");
|
||||
|
@ -720,7 +720,7 @@ static const struct ethtool_ops qe_ethtool_ops = {
|
|||
};
|
||||
|
||||
/* This is only called once at boot time for each card probed. */
|
||||
static void qec_init_once(struct sunqec *qecp, struct of_device *op)
|
||||
static void qec_init_once(struct sunqec *qecp, struct platform_device *op)
|
||||
{
|
||||
u8 bsizes = qecp->qec_bursts;
|
||||
|
||||
|
@ -770,9 +770,9 @@ static u8 __devinit qec_get_burst(struct device_node *dp)
|
|||
return bsizes;
|
||||
}
|
||||
|
||||
static struct sunqec * __devinit get_qec(struct of_device *child)
|
||||
static struct sunqec * __devinit get_qec(struct platform_device *child)
|
||||
{
|
||||
struct of_device *op = to_of_device(child->dev.parent);
|
||||
struct platform_device *op = to_platform_device(child->dev.parent);
|
||||
struct sunqec *qecp;
|
||||
|
||||
qecp = dev_get_drvdata(&op->dev);
|
||||
|
@ -836,7 +836,7 @@ static const struct net_device_ops qec_ops = {
|
|||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
||||
static int __devinit qec_ether_init(struct of_device *op)
|
||||
static int __devinit qec_ether_init(struct platform_device *op)
|
||||
{
|
||||
static unsigned version_printed;
|
||||
struct net_device *dev;
|
||||
|
@ -941,12 +941,12 @@ fail:
|
|||
return res;
|
||||
}
|
||||
|
||||
static int __devinit qec_sbus_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit qec_sbus_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
return qec_ether_init(op);
|
||||
}
|
||||
|
||||
static int __devexit qec_sbus_remove(struct of_device *op)
|
||||
static int __devexit qec_sbus_remove(struct platform_device *op)
|
||||
{
|
||||
struct sunqe *qp = dev_get_drvdata(&op->dev);
|
||||
struct net_device *net_dev = qp->dev;
|
||||
|
@ -997,7 +997,7 @@ static void __exit qec_exit(void)
|
|||
|
||||
while (root_qec_dev) {
|
||||
struct sunqec *next = root_qec_dev->next_module;
|
||||
struct of_device *op = root_qec_dev->op;
|
||||
struct platform_device *op = root_qec_dev->op;
|
||||
|
||||
free_irq(op->archdata.irqs[0], (void *) root_qec_dev);
|
||||
of_iounmap(&op->resource[0], root_qec_dev->gregs,
|
||||
|
|
|
@ -314,7 +314,7 @@ struct sunqec {
|
|||
void __iomem *gregs; /* QEC Global Registers */
|
||||
struct sunqe *qes[4]; /* Each child MACE */
|
||||
unsigned int qec_bursts; /* Support burst sizes */
|
||||
struct of_device *op; /* QEC's OF device */
|
||||
struct platform_device *op; /* QEC's OF device */
|
||||
struct sunqec *next_module; /* List of all QECs in system */
|
||||
};
|
||||
|
||||
|
@ -342,7 +342,7 @@ struct sunqe {
|
|||
__u32 buffers_dvma; /* DVMA visible address. */
|
||||
struct sunqec *parent;
|
||||
u8 mconfig; /* Base MACE mconfig value */
|
||||
struct of_device *op; /* QE's OF device struct */
|
||||
struct platform_device *op; /* QE's OF device struct */
|
||||
struct net_device *dev; /* QE's netdevice struct */
|
||||
int channel; /* Who am I? */
|
||||
};
|
||||
|
|
|
@ -3601,7 +3601,7 @@ static void ucc_geth_timeout(struct net_device *dev)
|
|||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
static int ucc_geth_suspend(struct of_device *ofdev, pm_message_t state)
|
||||
static int ucc_geth_suspend(struct platform_device *ofdev, pm_message_t state)
|
||||
{
|
||||
struct net_device *ndev = dev_get_drvdata(&ofdev->dev);
|
||||
struct ucc_geth_private *ugeth = netdev_priv(ndev);
|
||||
|
@ -3629,7 +3629,7 @@ static int ucc_geth_suspend(struct of_device *ofdev, pm_message_t state)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ucc_geth_resume(struct of_device *ofdev)
|
||||
static int ucc_geth_resume(struct platform_device *ofdev)
|
||||
{
|
||||
struct net_device *ndev = dev_get_drvdata(&ofdev->dev);
|
||||
struct ucc_geth_private *ugeth = netdev_priv(ndev);
|
||||
|
@ -3732,7 +3732,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = {
|
|||
#endif
|
||||
};
|
||||
|
||||
static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match)
|
||||
static int ucc_geth_probe(struct platform_device* ofdev, const struct of_device_id *match)
|
||||
{
|
||||
struct device *device = &ofdev->dev;
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
@ -3954,7 +3954,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ucc_geth_remove(struct of_device* ofdev)
|
||||
static int ucc_geth_remove(struct platform_device* ofdev)
|
||||
{
|
||||
struct device *device = &ofdev->dev;
|
||||
struct net_device *dev = dev_get_drvdata(device);
|
||||
|
|
|
@ -1086,7 +1086,7 @@ static void xemaclite_remove_ndev(struct net_device *ndev)
|
|||
*
|
||||
* Return: Value of the parameter if the parameter is found, or 0 otherwise
|
||||
*/
|
||||
static bool get_bool(struct of_device *ofdev, const char *s)
|
||||
static bool get_bool(struct platform_device *ofdev, const char *s)
|
||||
{
|
||||
u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL);
|
||||
|
||||
|
@ -1115,7 +1115,7 @@ static struct net_device_ops xemaclite_netdev_ops;
|
|||
* Return: 0, if the driver is bound to the Emaclite device, or
|
||||
* a negative error if there is failure.
|
||||
*/
|
||||
static int __devinit xemaclite_of_probe(struct of_device *ofdev,
|
||||
static int __devinit xemaclite_of_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct resource r_irq; /* Interrupt resources */
|
||||
|
@ -1240,7 +1240,7 @@ error2:
|
|||
*
|
||||
* Return: 0, always.
|
||||
*/
|
||||
static int __devexit xemaclite_of_remove(struct of_device *of_dev)
|
||||
static int __devexit xemaclite_of_remove(struct platform_device *of_dev)
|
||||
{
|
||||
struct device *dev = &of_dev->dev;
|
||||
struct net_device *ndev = dev_get_drvdata(dev);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* @ids: array of of device match structures to search in
|
||||
* @dev: the of device structure to match against
|
||||
*
|
||||
* Used by a driver to check whether an of_device present in the
|
||||
* Used by a driver to check whether an platform_device present in the
|
||||
* system is in its list of supported devices.
|
||||
*/
|
||||
const struct of_device_id *of_match_device(const struct of_device_id *matches,
|
||||
|
|
|
@ -286,7 +286,7 @@ static struct parport_operations parport_sunbpp_ops =
|
|||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static int __devinit bpp_probe(struct of_device *op, const struct of_device_id *match)
|
||||
static int __devinit bpp_probe(struct platform_device *op, const struct of_device_id *match)
|
||||
{
|
||||
struct parport_operations *ops;
|
||||
struct bpp_regs __iomem *regs;
|
||||
|
@ -351,7 +351,7 @@ out_unmap:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit bpp_remove(struct of_device *op)
|
||||
static int __devexit bpp_remove(struct platform_device *op)
|
||||
{
|
||||
struct parport *p = dev_get_drvdata(&op->dev);
|
||||
struct parport_operations *ops = p->ops;
|
||||
|
|
|
@ -44,7 +44,7 @@ struct electra_cf_socket {
|
|||
unsigned present:1;
|
||||
unsigned active:1;
|
||||
|
||||
struct of_device *ofdev;
|
||||
struct platform_device *ofdev;
|
||||
unsigned long mem_phys;
|
||||
void __iomem * mem_base;
|
||||
unsigned long mem_size;
|
||||
|
@ -181,7 +181,7 @@ static struct pccard_operations electra_cf_ops = {
|
|||
.set_mem_map = electra_cf_set_mem_map,
|
||||
};
|
||||
|
||||
static int __devinit electra_cf_probe(struct of_device *ofdev,
|
||||
static int __devinit electra_cf_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device *device = &ofdev->dev;
|
||||
|
@ -325,7 +325,7 @@ fail1:
|
|||
|
||||
}
|
||||
|
||||
static int __devexit electra_cf_remove(struct of_device *ofdev)
|
||||
static int __devexit electra_cf_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct device *device = &ofdev->dev;
|
||||
struct electra_cf_socket *cf;
|
||||
|
|
|
@ -1149,7 +1149,7 @@ static struct pccard_operations m8xx_services = {
|
|||
.set_mem_map = m8xx_set_mem_map,
|
||||
};
|
||||
|
||||
static int __init m8xx_probe(struct of_device *ofdev,
|
||||
static int __init m8xx_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct pcmcia_win *w;
|
||||
|
@ -1249,7 +1249,7 @@ static int __init m8xx_probe(struct of_device *ofdev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int m8xx_remove(struct of_device *ofdev)
|
||||
static int m8xx_remove(struct platform_device *ofdev)
|
||||
{
|
||||
u32 m, i;
|
||||
struct pcmcia_win *w;
|
||||
|
|
|
@ -268,7 +268,7 @@ static const struct rtc_class_ops mpc5121_rtc_ops = {
|
|||
.update_irq_enable = mpc5121_rtc_update_irq_enable,
|
||||
};
|
||||
|
||||
static int __devinit mpc5121_rtc_probe(struct of_device *op,
|
||||
static int __devinit mpc5121_rtc_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct mpc5121_rtc_data *rtc;
|
||||
|
@ -338,7 +338,7 @@ out_free:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit mpc5121_rtc_remove(struct of_device *op)
|
||||
static int __devexit mpc5121_rtc_remove(struct platform_device *op)
|
||||
{
|
||||
struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev);
|
||||
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
|
||||
|
|
|
@ -443,7 +443,7 @@ static int kenvctrld(void *__unused)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void attach_one_temp(struct bbc_i2c_bus *bp, struct of_device *op,
|
||||
static void attach_one_temp(struct bbc_i2c_bus *bp, struct platform_device *op,
|
||||
int temp_idx)
|
||||
{
|
||||
struct bbc_cpu_temperature *tp;
|
||||
|
@ -488,7 +488,7 @@ static void attach_one_temp(struct bbc_i2c_bus *bp, struct of_device *op,
|
|||
tp->fan_todo[FAN_CPU] = FAN_SAME;
|
||||
}
|
||||
|
||||
static void attach_one_fan(struct bbc_i2c_bus *bp, struct of_device *op,
|
||||
static void attach_one_fan(struct bbc_i2c_bus *bp, struct platform_device *op,
|
||||
int fan_idx)
|
||||
{
|
||||
struct bbc_fan_control *fp;
|
||||
|
@ -559,7 +559,7 @@ static void destroy_all_fans(struct bbc_i2c_bus *bp)
|
|||
|
||||
int bbc_envctrl_init(struct bbc_i2c_bus *bp)
|
||||
{
|
||||
struct of_device *op;
|
||||
struct platform_device *op;
|
||||
int temp_index = 0;
|
||||
int fan_index = 0;
|
||||
int devidx = 0;
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
* The second controller also connects to the smartcard reader, if present.
|
||||
*/
|
||||
|
||||
static void set_device_claimage(struct bbc_i2c_bus *bp, struct of_device *op, int val)
|
||||
static void set_device_claimage(struct bbc_i2c_bus *bp, struct platform_device *op, int val)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -66,9 +66,9 @@ static void set_device_claimage(struct bbc_i2c_bus *bp, struct of_device *op, in
|
|||
#define claim_device(BP,ECHILD) set_device_claimage(BP,ECHILD,1)
|
||||
#define release_device(BP,ECHILD) set_device_claimage(BP,ECHILD,0)
|
||||
|
||||
struct of_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index)
|
||||
struct platform_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index)
|
||||
{
|
||||
struct of_device *op = NULL;
|
||||
struct platform_device *op = NULL;
|
||||
int curidx = 0, i;
|
||||
|
||||
for (i = 0; i < NUM_CHILDREN; i++) {
|
||||
|
@ -86,7 +86,7 @@ out:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *op)
|
||||
struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *op)
|
||||
{
|
||||
struct bbc_i2c_client *client;
|
||||
const u32 *reg;
|
||||
|
@ -114,7 +114,7 @@ struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *
|
|||
void bbc_i2c_detach(struct bbc_i2c_client *client)
|
||||
{
|
||||
struct bbc_i2c_bus *bp = client->bp;
|
||||
struct of_device *op = client->op;
|
||||
struct platform_device *op = client->op;
|
||||
|
||||
release_device(bp, op);
|
||||
kfree(client);
|
||||
|
@ -297,7 +297,7 @@ static void __init reset_one_i2c(struct bbc_i2c_bus *bp)
|
|||
writeb(I2C_PCF_IDLE, bp->i2c_control_regs + 0x0);
|
||||
}
|
||||
|
||||
static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int index)
|
||||
static struct bbc_i2c_bus * __init attach_one_i2c(struct platform_device *op, int index)
|
||||
{
|
||||
struct bbc_i2c_bus *bp;
|
||||
struct device_node *dp;
|
||||
|
@ -330,7 +330,7 @@ static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int inde
|
|||
for (dp = op->dev.of_node->child;
|
||||
dp && entry < 8;
|
||||
dp = dp->sibling, entry++) {
|
||||
struct of_device *child_op;
|
||||
struct platform_device *child_op;
|
||||
|
||||
child_op = of_find_device_by_node(dp);
|
||||
bp->devs[entry].device = child_op;
|
||||
|
@ -361,7 +361,7 @@ fail:
|
|||
extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
|
||||
extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
|
||||
|
||||
static int __devinit bbc_i2c_probe(struct of_device *op,
|
||||
static int __devinit bbc_i2c_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct bbc_i2c_bus *bp;
|
||||
|
@ -386,7 +386,7 @@ static int __devinit bbc_i2c_probe(struct of_device *op,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devexit bbc_i2c_remove(struct of_device *op)
|
||||
static int __devexit bbc_i2c_remove(struct platform_device *op)
|
||||
{
|
||||
struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
struct bbc_i2c_client {
|
||||
struct bbc_i2c_bus *bp;
|
||||
struct of_device *op;
|
||||
struct platform_device *op;
|
||||
int bus;
|
||||
int address;
|
||||
};
|
||||
|
@ -64,16 +64,16 @@ struct bbc_i2c_bus {
|
|||
struct list_head temps;
|
||||
struct list_head fans;
|
||||
|
||||
struct of_device *op;
|
||||
struct platform_device *op;
|
||||
struct {
|
||||
struct of_device *device;
|
||||
struct platform_device *device;
|
||||
int client_claimed;
|
||||
} devs[NUM_CHILDREN];
|
||||
};
|
||||
|
||||
/* Probing and attachment. */
|
||||
extern struct of_device *bbc_i2c_getdev(struct bbc_i2c_bus *, int);
|
||||
extern struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *);
|
||||
extern struct platform_device *bbc_i2c_getdev(struct bbc_i2c_bus *, int);
|
||||
extern struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *);
|
||||
extern void bbc_i2c_detach(struct bbc_i2c_client *);
|
||||
|
||||
/* Register read/write. NOTE: Blocking! */
|
||||
|
|
|
@ -170,7 +170,7 @@ static struct miscdevice d7s_miscdev = {
|
|||
.fops = &d7s_fops
|
||||
};
|
||||
|
||||
static int __devinit d7s_probe(struct of_device *op,
|
||||
static int __devinit d7s_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *opts;
|
||||
|
@ -236,7 +236,7 @@ out_free:
|
|||
goto out;
|
||||
}
|
||||
|
||||
static int __devexit d7s_remove(struct of_device *op)
|
||||
static int __devexit d7s_remove(struct platform_device *op)
|
||||
{
|
||||
struct d7s *p = dev_get_drvdata(&op->dev);
|
||||
u8 regs = readb(p->regs);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue