diff options
Diffstat (limited to 'drivers/w1/masters/omap_hdq.c')
| -rw-r--r-- | drivers/w1/masters/omap_hdq.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index ca8e60bb2f9..9900e8ec739 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c @@ -69,12 +69,12 @@ struct hdq_data { int init_trans; }; -static int __devinit omap_hdq_probe(struct platform_device *pdev); -static int __devexit omap_hdq_remove(struct platform_device *pdev); +static int omap_hdq_probe(struct platform_device *pdev); +static int omap_hdq_remove(struct platform_device *pdev); static struct platform_driver omap_hdq_driver = { .probe = omap_hdq_probe, - .remove = __devexit_p(omap_hdq_remove), + .remove = omap_hdq_remove, .driver = { .name = "omap_hdq", }, @@ -537,7 +537,7 @@ static void omap_w1_write_byte(void *_hdq, u8 byte) } } -static int __devinit omap_hdq_probe(struct platform_device *pdev) +static int omap_hdq_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct hdq_data *hdq_data; @@ -555,16 +555,9 @@ static int __devinit omap_hdq_probe(struct platform_device *pdev) platform_set_drvdata(pdev, hdq_data); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_dbg(&pdev->dev, "unable to get resource\n"); - return -ENXIO; - } - - hdq_data->hdq_base = devm_request_and_ioremap(dev, res); - if (!hdq_data->hdq_base) { - dev_dbg(&pdev->dev, "ioremap failed\n"); - return -ENOMEM; - } + hdq_data->hdq_base = devm_ioremap_resource(dev, res); + if (IS_ERR(hdq_data->hdq_base)) + return PTR_ERR(hdq_data->hdq_base); hdq_data->hdq_usecount = 0; mutex_init(&hdq_data->hdq_mutex); @@ -584,8 +577,7 @@ static int __devinit omap_hdq_probe(struct platform_device *pdev) goto err_irq; } - ret = devm_request_irq(dev, irq, hdq_isr, IRQF_DISABLED, - "omap_hdq", hdq_data); + ret = devm_request_irq(dev, irq, hdq_isr, 0, "omap_hdq", hdq_data); if (ret < 0) { dev_dbg(&pdev->dev, "could not request irq\n"); goto err_irq; @@ -613,7 +605,7 @@ err_w1: return ret; } -static int __devexit omap_hdq_remove(struct platform_device *pdev) +static int omap_hdq_remove(struct platform_device *pdev) { struct hdq_data *hdq_data = platform_get_drvdata(pdev); |
