.. | .. |
---|
289 | 289 | * interrupt handlers. |
---|
290 | 290 | * |
---|
291 | 291 | * Returns: 0 on success, a negative error code on failure. |
---|
292 | | - * The response message is returned in @msg. Shall be freed with |
---|
| 292 | + * The response message is returned in @msg. Shall be freed |
---|
293 | 293 | * with nvec_msg_free() once no longer used. |
---|
294 | 294 | * |
---|
295 | 295 | */ |
---|
.. | .. |
---|
767 | 767 | struct device *dev = &pdev->dev; |
---|
768 | 768 | struct nvec_chip *nvec; |
---|
769 | 769 | struct nvec_msg *msg; |
---|
770 | | - struct resource *res; |
---|
771 | 770 | void __iomem *base; |
---|
772 | 771 | char get_firmware_version[] = { NVEC_CNTL, GET_FIRMWARE_VERSION }, |
---|
773 | 772 | unmute_speakers[] = { NVEC_OEM0, 0x10, 0x59, 0x95 }, |
---|
.. | .. |
---|
790 | 789 | return -ENODEV; |
---|
791 | 790 | } |
---|
792 | 791 | |
---|
793 | | - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
---|
794 | | - base = devm_ioremap_resource(dev, res); |
---|
| 792 | + base = devm_platform_ioremap_resource(pdev, 0); |
---|
795 | 793 | if (IS_ERR(base)) |
---|
796 | 794 | return PTR_ERR(base); |
---|
797 | 795 | |
---|
798 | 796 | nvec->irq = platform_get_irq(pdev, 0); |
---|
799 | | - if (nvec->irq < 0) { |
---|
800 | | - dev_err(dev, "no irq resource?\n"); |
---|
| 797 | + if (nvec->irq < 0) |
---|
801 | 798 | return -ENODEV; |
---|
802 | | - } |
---|
803 | 799 | |
---|
804 | 800 | i2c_clk = devm_clk_get(dev, "div-clk"); |
---|
805 | 801 | if (IS_ERR(i2c_clk)) { |
---|