struct mbox_chan *chan; /* The property channel. */
struct completion c;
u32 enabled;
+ u32 get_throttled;
+
+ struct kref consumers;
};
+static struct platform_device *g_pdev;
+
static DEFINE_MUTEX(transaction_lock);
static void response_callback(struct mbox_client *cl, void *msg)
}
init_completion(&fw->c);
+ kref_init(&fw->consumers);
platform_set_drvdata(pdev, fw);
+ g_pdev = pdev;
rpi_firmware_print_firmware_revision(fw);
+ rpi_firmware_print_firmware_hash(fw);
rpi_register_hwmon_driver(dev, fw);
rpi_register_clk_driver(dev);
rpi_hwmon = NULL;
platform_device_unregister(rpi_clk);
rpi_clk = NULL;
- mbox_free_channel(fw->chan);
+ g_pdev = NULL;
+ rpi_firmware_put(fw);
+
return 0;
}