aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto/nx/nx-842.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-02-21 00:13:43 +0900
committerMark Brown <broonie@kernel.org>2015-02-21 00:13:43 +0900
commit21d7f14b70fed254222a24e124e8771e1437be4c (patch)
tree3c52e48b28d5675bafa005e061b5639966671ca3 /drivers/crypto/nx/nx-842.c
parenteff6a902ff6b8a42f768c4b78fc63b9b8d0a41d9 (diff)
parent2ea8f7ea87f24735c49543c7f523919295028c58 (diff)
Merge branch 'lsk/v3.14/topic/of' into linux-linaro-lsk-v3.14lsk-v3.14-15.02lsk-v3.14-14.02
Conflicts: drivers/of/Kconfig drivers/of/Makefile drivers/of/address.c drivers/of/selftest.c include/linux/of.h
Diffstat (limited to 'drivers/crypto/nx/nx-842.c')
-rw-r--r--drivers/crypto/nx/nx-842.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c
index 1e5481d88a26..d2ab58569fdd 100644
--- a/drivers/crypto/nx/nx-842.c
+++ b/drivers/crypto/nx/nx-842.c
@@ -936,28 +936,14 @@ static int nx842_OF_upd(struct property *new_prop)
goto error_out;
}
- /* Set ptr to new property if provided */
- if (new_prop) {
- /* Single property */
- if (!strncmp(new_prop->name, "status", new_prop->length)) {
- status = new_prop;
-
- } else if (!strncmp(new_prop->name, "ibm,max-sg-len",
- new_prop->length)) {
- maxsglen = new_prop;
-
- } else if (!strncmp(new_prop->name, "ibm,max-sync-cop",
- new_prop->length)) {
- maxsyncop = new_prop;
-
- } else {
- /*
- * Skip the update, the property being updated
- * has no impact.
- */
- goto out;
- }
- }
+ /*
+ * If this is a property update, there are only certain properties that
+ * we care about. Bail if it isn't in the below list
+ */
+ if (new_prop && (strncmp(new_prop->name, "status", new_prop->length) ||
+ strncmp(new_prop->name, "ibm,max-sg-len", new_prop->length) ||
+ strncmp(new_prop->name, "ibm,max-sync-cop", new_prop->length)))
+ goto out;
/* Perform property updates */
ret = nx842_OF_upd_status(new_devdata, status);
@@ -1023,9 +1009,9 @@ error_out:
* notifier_to_errno() to decode this value
*/
static int nx842_OF_notifier(struct notifier_block *np, unsigned long action,
- void *update)
+ void *data)
{
- struct of_prop_reconfig *upd = update;
+ struct of_reconfig_data *upd = data;
struct nx842_devdata *local_devdata;
struct device_node *node = NULL;