Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284661
b: refs/heads/master
c: 69116f2
h: refs/heads/master
i:
  284659: a6bce29
v: v3
  • Loading branch information
Rusty Russell committed Jan 12, 2012
1 parent 662f1a7 commit a2519ac
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bafeafeab94b8d3019aac15c2df2ce47b08a6363
refs/heads/master: 69116f279a9eaf4c540934269342d9149538fc79
2 changes: 1 addition & 1 deletion trunk/drivers/hwmon/emc2103.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static const u8 REG_TEMP_MAX[4] = { 0x34, 0x30, 0x31, 0x32 };
* it. Default is to leave the device in the state it's already in (-1).
* This parameter allows APD mode to be optionally forced on or off */
static int apd = -1;
module_param(apd, bool, 0);
module_param(apd, bint, 0);
MODULE_PARM_DESC(init, "Set to zero to disable anti-parallel diode mode");

struct temperature {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/hw/ehca/ehca_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module_param_named(port_act_time, ehca_port_act_time, int, S_IRUGO);
module_param_named(poll_all_eqs, ehca_poll_all_eqs, bool, S_IRUGO);
module_param_named(static_rate, ehca_static_rate, int, S_IRUGO);
module_param_named(scaling_code, ehca_scaling_code, bool, S_IRUGO);
module_param_named(lock_hcalls, ehca_lock_hcalls, bool, S_IRUGO);
module_param_named(lock_hcalls, ehca_lock_hcalls, bint, S_IRUGO);
module_param_named(number_of_cqs, ehca_max_cq, int, S_IRUGO);
module_param_named(number_of_qps, ehca_max_qp, int, S_IRUGO);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/cmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ enum cmb_format {
* enum cmb_format.
*/
static int format = CMF_AUTODETECT;
module_param(format, bool, 0444);
module_param(format, bint, 0444);

/**
* struct cmb_operations - functions to use depending on cmb_format
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/ntfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -3198,7 +3198,7 @@ MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2011 Anton Altaparm
MODULE_VERSION(NTFS_VERSION);
MODULE_LICENSE("GPL");
#ifdef DEBUG
module_param(debug_msgs, bool, 0);
module_param(debug_msgs, bint, 0);
MODULE_PARM_DESC(debug_msgs, "Enable debug messages.");
#endif

Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/moduleparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,12 @@ extern int param_set_invbool(const char *val, const struct kernel_param *kp);
extern int param_get_invbool(char *buffer, const struct kernel_param *kp);
#define param_check_invbool(name, p) __param_check(name, p, bool)

/* An int, which can only be set like a bool (though it shows as an int). */
extern struct kernel_param_ops param_ops_bint;
extern int param_set_bint(const char *val, const struct kernel_param *kp);
#define param_get_bint param_get_int
#define param_check_bint param_check_int

/**
* module_param_array - a parameter which is an array of some type
* @name: the name of the array variable
Expand Down
24 changes: 24 additions & 0 deletions trunk/kernel/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,30 @@ struct kernel_param_ops param_ops_invbool = {
};
EXPORT_SYMBOL(param_ops_invbool);

int param_set_bint(const char *val, const struct kernel_param *kp)
{
struct kernel_param boolkp;
bool v;
int ret;

/* Match bool exactly, by re-using it. */
boolkp = *kp;
boolkp.arg = &v;
boolkp.flags |= KPARAM_ISBOOL;

ret = param_set_bool(val, &boolkp);
if (ret == 0)
*(int *)kp->arg = v;
return ret;
}
EXPORT_SYMBOL(param_set_bint);

struct kernel_param_ops param_ops_bint = {
.set = param_set_bint,
.get = param_get_int,
};
EXPORT_SYMBOL(param_ops_bint);

/* We break the rule and mangle the string. */
static int param_array(const char *name,
const char *val,
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/pci/intel8x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ module_param(ac97_quirk, charp, 0444);
MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
module_param(buggy_semaphore, bool, 0444);
MODULE_PARM_DESC(buggy_semaphore, "Enable workaround for hardwares with problematic codec semaphores.");
module_param(buggy_irq, bool, 0444);
module_param(buggy_irq, bint, 0444);
MODULE_PARM_DESC(buggy_irq, "Enable workaround for buggy interrupts on some motherboards.");
module_param(xbox, bool, 0444);
MODULE_PARM_DESC(xbox, "Set to 1 for Xbox, if you have problems with the AC'97 codec detection.");
module_param(spdif_aclink, int, 0444);
MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link.");
module_param(inside_vm, bool, 0444);
module_param(inside_vm, bint, 0444);
MODULE_PARM_DESC(inside_vm, "KVM/Parallels optimization.");

/* just for backward compatibility */
Expand Down

0 comments on commit a2519ac

Please sign in to comment.