diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-04-25 12:24:16 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-04-25 12:24:16 +0200 |
commit | cd32b1616bc79b2f2ce1b1c6164beecfecc2259c (patch) | |
tree | 2e91c49b5c2bd927b9b74b7414dbb6839af601e1 /include | |
parent | 89b8835ec865dddd6673a8dd7003581bf2377176 (diff) | |
parent | a720b2dd2470a52345df11dca8d6c1466599f812 (diff) | |
download | linux-cd32b1616bc79b2f2ce1b1c6164beecfecc2259c.tar.gz linux-cd32b1616bc79b2f2ce1b1c6164beecfecc2259c.tar.bz2 linux-cd32b1616bc79b2f2ce1b1c6164beecfecc2259c.zip |
Merge tag 'l3-fix-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp into x86/urgent
A small L3 cache index disable fix from Srivatsa Bhat which unifies the
way the code checks for already disabled indices.
( Pulling it into v3.4 despite the v3.5 tag - the fix is small and we better
keep the same code across kernel versions for such user facing interfaces. )
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/amba/bus.h | 7 | ||||
-rw-r--r-- | include/linux/stddef.h | 8 | ||||
-rw-r--r-- | include/scsi/scsi_cmnd.h | 3 |
3 files changed, 5 insertions, 13 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 7847e197730a..8d54f79457ba 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h @@ -30,7 +30,6 @@ struct amba_device { struct device dev; struct resource res; struct clk *pclk; - struct regulator *vcore; u64 dma_mask; unsigned int periphid; unsigned int irq[AMBA_NR_IRQS]; @@ -75,12 +74,6 @@ void amba_release_regions(struct amba_device *); #define amba_pclk_disable(d) \ do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0) -#define amba_vcore_enable(d) \ - (IS_ERR((d)->vcore) ? 0 : regulator_enable((d)->vcore)) - -#define amba_vcore_disable(d) \ - do { if (!IS_ERR((d)->vcore)) regulator_disable((d)->vcore); } while (0) - /* Some drivers don't use the struct amba_device */ #define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff) #define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f) diff --git a/include/linux/stddef.h b/include/linux/stddef.h index 6a40c76bdcf1..1747b6787b9e 100644 --- a/include/linux/stddef.h +++ b/include/linux/stddef.h @@ -3,14 +3,10 @@ #include <linux/compiler.h> +#ifdef __KERNEL__ + #undef NULL -#if defined(__cplusplus) -#define NULL 0 -#else #define NULL ((void *)0) -#endif - -#ifdef __KERNEL__ enum { false = 0, diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 377df4a28512..1e1198546c72 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -134,6 +134,9 @@ struct scsi_cmnd { static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) { + if (!cmd->request->rq_disk) + return NULL; + return *(struct scsi_driver **)cmd->request->rq_disk->private_data; } |