msm: pil: Pass pil_device to ops
This makes it easier to have one function used for multiple
devices (e.g. Q6v4 on 8960).
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/peripheral-loader.h b/arch/arm/mach-msm/peripheral-loader.h
index e0dc3a6..7357432 100644
--- a/arch/arm/mach-msm/peripheral-loader.h
+++ b/arch/arm/mach-msm/peripheral-loader.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -16,13 +16,6 @@
#include <linux/mutex.h>
#include <linux/platform_device.h>
-struct pil_reset_ops {
- int (*init_image)(const u8 *metadata, size_t size);
- int (*verify_blob)(u32 phy_addr, size_t size);
- int (*auth_and_reset)(void);
- int (*shutdown)(void);
-};
-
struct pil_device {
const char *name;
const char *depends_on;
@@ -33,6 +26,14 @@
struct pil_reset_ops *ops;
};
+struct pil_reset_ops {
+ int (*init_image)(struct pil_device *pil, const u8 *metadata,
+ size_t size);
+ int (*verify_blob)(struct pil_device *pil, u32 phy_addr, size_t size);
+ int (*auth_and_reset)(struct pil_device *pil);
+ int (*shutdown)(struct pil_device *pil);
+};
+
extern int msm_pil_add_device(struct pil_device *pil);
#endif