device_create_file(dev, &dev_attr_battery_percentage); device_create_file(dev, &dev_attr_battery_voltage); 
device_create_file(&pdev->dev, &dev_attr_battery_percentage); device_create_file(&pdev->dev, &dev_attr_battery_voltage); 
static int __init sharpsl_pm_probe(struct device *dev){	if (!dev->platform_data)		return -EINVAL;	sharpsl_pm.dev = dev;	sharpsl_pm.machinfo = dev->platform_data;	sharpsl_pm.charge_mode = CHRG_OFF;	sharpsl_pm.flags = 0;	sharpsl_pm.machinfo->init();	init_timer(&sharpsl_pm.ac_timer);	sharpsl_pm.ac_timer.function = sharpsl_ac_timer;	init_timer(&sharpsl_pm.chrg_full_timer);	sharpsl_pm.chrg_full_timer.function = sharpsl_chrg_full_timer;	pxa_gpio_mode(sharpsl_pm.machinfo->gpio_acin | GPIO_IN);	pxa_gpio_mode(sharpsl_pm.machinfo->gpio_batfull | GPIO_IN);	pxa_gpio_mode(sharpsl_pm.machinfo->gpio_batlock | GPIO_IN);	/* Register interrupt handlers */	if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr, SA_INTERRUPT, "AC Input Detect", sharpsl_ac_isr)) {		dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin));	}	else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin),IRQT_BOTHEDGE);	if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr, SA_INTERRUPT, "Battery Cover", sharpsl_fatal_isr)) {		dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock));	}	else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock),IRQT_FALLING);	if (sharpsl_pm.machinfo->gpio_fatal) {		if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr, SA_INTERRUPT, "Fatal Battery", sharpsl_fatal_isr)) {			dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal));		}		else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal),IRQT_FALLING);	}	if (!machine_is_corgi())	{		/* Register interrupt handler. */		if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, SA_INTERRUPT, "CO", sharpsl_chrg_full_isr)) {			dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull));		}		else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull),IRQT_RISING);	}	device_create_file(dev, &dev_attr_battery_percentage);	device_create_file(dev, &dev_attr_battery_voltage);	apm_get_power_status = sharpsl_apm_get_power_status;	pm_set_ops(&sharpsl_pm_ops);	mod_timer(&sharpsl_pm.ac_timer, jiffies + msecs_to_jiffies(250));	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c5e1ae9729d97d3c543cc70d7865df1e724da0d0/sharpsl_pm.c/clean/arch/arm/mach-pxa/sharpsl_pm.c