From 4b7e4f8289c1ca60accb6c1baf31984f69bc2771 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 19 Nov 2014 14:04:20 +1100 Subject: w1: support auto-load of w1_bq27000 module. 1/ change request_module call to zero-pad single digit family numbers. This appears to be the intention of the code, but not what it actually does. This means that the alias created for W1_FAMILY_SMEM_01 might actually be useful. 2/ Define a family name for the BQ27000 battery charge monitor. Unfortunately this is the same number as W1_FAMILY_SMEM_01 so if both a compiled on a system, one module might need to be blacklisted. 3/ Add a MODULE_ALIAS for the bq27000. Acked-by: Evgeniy Polyakov Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman --- drivers/w1/slaves/w1_bq27000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/w1/slaves/w1_bq27000.c') diff --git a/drivers/w1/slaves/w1_bq27000.c b/drivers/w1/slaves/w1_bq27000.c index afbefed5f2c9..caafb1722783 100644 --- a/drivers/w1/slaves/w1_bq27000.c +++ b/drivers/w1/slaves/w1_bq27000.c @@ -88,7 +88,7 @@ static struct w1_family_ops w1_bq27000_fops = { }; static struct w1_family w1_bq27000_family = { - .fid = 1, + .fid = W1_FAMILY_BQ27000, .fops = &w1_bq27000_fops, }; @@ -111,7 +111,7 @@ module_exit(w1_bq27000_exit); module_param(F_ID, int, S_IRUSR); MODULE_PARM_DESC(F_ID, "1-wire slave FID for BQ device"); - +MODULE_ALIAS("w1-family-" __stringify(W1_FAMILY_BQ27000)); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Texas Instruments Ltd"); MODULE_DESCRIPTION("HDQ/1-wire slave driver bq27000 battery monitor chip"); -- cgit v1.2.3-55-g7522