These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / powerpc / platforms / 52xx / mpc52xx_gpt.c
index c949ca0..3048e34 100644 (file)
@@ -191,9 +191,9 @@ static struct irq_chip mpc52xx_gpt_irq_chip = {
        .irq_set_type = mpc52xx_gpt_irq_set_type,
 };
 
-void mpc52xx_gpt_irq_cascade(unsigned int virq, struct irq_desc *desc)
+static void mpc52xx_gpt_irq_cascade(struct irq_desc *desc)
 {
-       struct mpc52xx_gpt_priv *gpt = irq_get_handler_data(virq);
+       struct mpc52xx_gpt_priv *gpt = irq_desc_get_handler_data(desc);
        int sub_virq;
        u32 status;
 
@@ -724,7 +724,7 @@ static int mpc52xx_gpt_probe(struct platform_device *ofdev)
 {
        struct mpc52xx_gpt_priv *gpt;
 
-       gpt = kzalloc(sizeof *gpt, GFP_KERNEL);
+       gpt = devm_kzalloc(&ofdev->dev, sizeof *gpt, GFP_KERNEL);
        if (!gpt)
                return -ENOMEM;
 
@@ -732,10 +732,8 @@ static int mpc52xx_gpt_probe(struct platform_device *ofdev)
        gpt->dev = &ofdev->dev;
        gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node);
        gpt->regs = of_iomap(ofdev->dev.of_node, 0);
-       if (!gpt->regs) {
-               kfree(gpt);
+       if (!gpt->regs)
                return -ENOMEM;
-       }
 
        dev_set_drvdata(&ofdev->dev, gpt);