From f790ca7c7dfd6b96d418a29d4a8654cdfebbdfc3 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Sun, 30 Oct 2016 23:16:10 +0530 Subject: 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 Cc: Bin Meng Cc: York Sun Cc: Vignesh R Cc: Mugunthan V N Cc: Michal Simek Cc: Siva Durga Prasad Paladugu Reviewed-by: Jagan Teki Tested-by: Jagan Teki Signed-off-by: Jagan Teki --- include/linux/err.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') 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. -- cgit v1.2.3