powerpc: remove references to of_device and to_of_device

of_device is just a #define alias to platform_device.  This patch
replaces all references to it with platform_device.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
Grant Likely
2010-07-22 15:52:34 -06:00
parent 94a0cb1fc6
commit a454dc5059
17 changed files with 47 additions and 46 deletions

View File

@ -60,7 +60,7 @@
static int azfs_major, azfs_minor;
struct axon_ram_bank {
struct of_device *device;
struct platform_device *device;
struct gendisk *disk;
unsigned int irq_id;
unsigned long ph_addr;
@ -72,7 +72,7 @@ struct axon_ram_bank {
static ssize_t
axon_ram_sysfs_ecc(struct device *dev, struct device_attribute *attr, char *buf)
{
struct of_device *device = to_of_device(dev);
struct platform_device *device = to_platform_device(dev);
struct axon_ram_bank *bank = device->dev.platform_data;
BUG_ON(!bank);
@ -90,7 +90,7 @@ static DEVICE_ATTR(ecc, S_IRUGO, axon_ram_sysfs_ecc, NULL);
static irqreturn_t
axon_ram_irq_handler(int irq, void *dev)
{
struct of_device *device = dev;
struct platform_device *device = dev;
struct axon_ram_bank *bank = device->dev.platform_data;
BUG_ON(!bank);
@ -174,8 +174,8 @@ static const struct block_device_operations axon_ram_devops = {
* axon_ram_probe - probe() method for platform driver
* @device, @device_id: see of_platform_driver method
*/
static int
axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
static int axon_ram_probe(struct platform_device *device,
const struct of_device_id *device_id)
{
static int axon_ram_bank_id = -1;
struct axon_ram_bank *bank;
@ -304,7 +304,7 @@ failed:
* @device: see of_platform_driver method
*/
static int
axon_ram_remove(struct of_device *device)
axon_ram_remove(struct platform_device *device)
{
struct axon_ram_bank *bank = device->dev.platform_data;

View File

@ -365,8 +365,8 @@ bcom_engine_cleanup(void)
/* OF platform driver */
/* ======================================================================== */
static int __devinit
mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match)
static int __devinit mpc52xx_bcom_probe(struct platform_device *op,
const struct of_device_id *match)
{
struct device_node *ofn_sram;
struct resource res_bcom;
@ -461,8 +461,7 @@ error_ofput:
}
static int
mpc52xx_bcom_remove(struct of_device *op)
static int mpc52xx_bcom_remove(struct platform_device *op)
{
/* Clean up the engine */
bcom_engine_cleanup();

View File

@ -250,7 +250,7 @@ unlock:
raw_spin_unlock(&desc->lock);
}
static int fsl_of_msi_remove(struct of_device *ofdev)
static int fsl_of_msi_remove(struct platform_device *ofdev)
{
struct fsl_msi *msi = ofdev->dev.platform_data;
int virq, i;
@ -274,7 +274,7 @@ static int fsl_of_msi_remove(struct of_device *ofdev)
return 0;
}
static int __devinit fsl_of_msi_probe(struct of_device *dev,
static int __devinit fsl_of_msi_probe(struct platform_device *dev,
const struct of_device_id *match)
{
struct fsl_msi *msi;

View File

@ -58,7 +58,8 @@ static struct platform_suspend_ops pmc_suspend_ops = {
.enter = pmc_suspend_enter,
};
static int pmc_probe(struct of_device *ofdev, const struct of_device_id *id)
static int pmc_probe(struct platform_device *ofdev,
const struct of_device_id *id)
{
pmc_regs = of_iomap(ofdev->dev.of_node, 0);
if (!pmc_regs)

View File

@ -1338,7 +1338,7 @@ static inline void fsl_rio_info(struct device *dev, u32 ccsr)
* master port with system-specific info, and registers the
* master port with the RapidIO subsystem.
*/
int fsl_rio_setup(struct of_device *dev)
int fsl_rio_setup(struct platform_device *dev)
{
struct rio_ops *ops;
struct rio_mport *port;
@ -1536,7 +1536,7 @@ err_ops:
/* The probe function for RapidIO peer-to-peer network.
*/
static int __devinit fsl_of_rio_rpn_probe(struct of_device *dev,
static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev,
const struct of_device_id *match)
{
int rc;

View File

@ -43,7 +43,7 @@ struct pmi_data {
struct mutex msg_mutex;
pmi_message_t msg;
struct completion *completion;
struct of_device *dev;
struct platform_device *dev;
int irq;
u8 __iomem *pmi_reg;
struct work_struct work;
@ -121,7 +121,7 @@ static void pmi_notify_handlers(struct work_struct *work)
spin_unlock(&data->handler_spinlock);
}
static int pmi_of_probe(struct of_device *dev,
static int pmi_of_probe(struct platform_device *dev,
const struct of_device_id *match)
{
struct device_node *np = dev->dev.of_node;
@ -185,7 +185,7 @@ out:
return rc;
}
static int pmi_of_remove(struct of_device *dev)
static int pmi_of_remove(struct platform_device *dev)
{
struct pmi_handler *handler, *tmp;

View File

@ -651,14 +651,15 @@ unsigned int qe_get_num_of_snums(void)
EXPORT_SYMBOL(qe_get_num_of_snums);
#if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC_85xx)
static int qe_resume(struct of_device *ofdev)
static int qe_resume(struct platform_device *ofdev)
{
if (!qe_alive_during_sleep())
qe_reset();
return 0;
}
static int qe_probe(struct of_device *ofdev, const struct of_device_id *id)
static int qe_probe(struct platform_device *ofdev,
const struct of_device_id *id)
{
return 0;
}