summaryrefslogtreecommitdiff
path: root/include/linux/err.h
diff options
context:
space:
mode:
authorJagan Teki <jagan@openedev.com>2016-10-30 23:16:10 +0530
committerJagan Teki <jagan@openedev.com>2016-11-18 13:04:52 +0530
commitf790ca7c7dfd6b96d418a29d4a8654cdfebbdfc3 (patch)
tree5dd55c9f3d0d57bd1cf96f0bf27104a2c986d148 /include/linux/err.h
parentebfa18cb3d8b5e6f57ac22e39b21c4fc1c1d3597 (diff)
sf: Adopt flash table INFO macro from Linux
INFO macro make flash table entries more adjustable like adding new flash_info attributes, update ID length bytes and so on and more over it will sync to Linux way of defining flash_info attributes. - Add JEDEC_ID - Add JEDEC_EXT macro - Add JEDEC_MFR - spi_flash_params => spi_flash_info - params => info Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: York Sun <york.sun@nxp.com> Cc: Vignesh R <vigneshr@ti.com> Cc: Mugunthan V N <mugunthanvnm@ti.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Reviewed-by: Jagan Teki <jagan@openedev.com> Tested-by: Jagan Teki <jagan@openedev.com> Signed-off-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'include/linux/err.h')
-rw-r--r--include/linux/err.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/err.h b/include/linux/err.h
index e4d22d508c..22e5756edd 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -36,6 +36,11 @@ static inline long IS_ERR(const void *ptr)
return IS_ERR_VALUE((unsigned long)ptr);
}
+static inline bool IS_ERR_OR_NULL(const void *ptr)
+{
+ return !ptr || IS_ERR_VALUE((unsigned long)ptr);
+}
+
/**
* ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
* @ptr: The pointer to cast.