Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11a79260 authored by Mike Frysinger's avatar Mike Frysinger Committed by Dmitry Torokhov
Browse files

Input: bf54x-keys - convert printk() to dev_*()



Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 48329582
Loading
Loading
Loading
Loading
+9 −17
Original line number Original line Diff line number Diff line
@@ -184,14 +184,13 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)
	int i, error;
	int i, error;


	if (!pdata->rows || !pdata->cols || !pdata->keymap) {
	if (!pdata->rows || !pdata->cols || !pdata->keymap) {
		printk(KERN_ERR DRV_NAME
		dev_err(&pdev->dev, "no rows, cols or keymap from pdata\n");
			": No rows, cols or keymap from pdata\n");
		return -EINVAL;
		return -EINVAL;
	}
	}


	if (!pdata->keymapsize ||
	if (!pdata->keymapsize ||
	    pdata->keymapsize > (pdata->rows * pdata->cols)) {
	    pdata->keymapsize > (pdata->rows * pdata->cols)) {
		printk(KERN_ERR DRV_NAME ": Invalid keymapsize\n");
		dev_err(&pdev->dev, "invalid keymapsize\n");
		return -EINVAL;
		return -EINVAL;
	}
	}


@@ -211,8 +210,8 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)


	if (!pdata->debounce_time || pdata->debounce_time > MAX_MULT ||
	if (!pdata->debounce_time || pdata->debounce_time > MAX_MULT ||
	    !pdata->coldrive_time || pdata->coldrive_time > MAX_MULT) {
	    !pdata->coldrive_time || pdata->coldrive_time > MAX_MULT) {
		printk(KERN_WARNING DRV_NAME
		dev_warn(&pdev->dev,
			": Invalid Debounce/Columndrive Time in platform data\n");
			"invalid platform debounce/columndrive time\n");
		bfin_write_KPAD_MSEL(0xFF0);	/* Default MSEL	*/
		bfin_write_KPAD_MSEL(0xFF0);	/* Default MSEL	*/
	} else {
	} else {
		bfin_write_KPAD_MSEL(
		bfin_write_KPAD_MSEL(
@@ -231,16 +230,14 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)


	if (peripheral_request_list((u16 *)&per_rows[MAX_RC - pdata->rows],
	if (peripheral_request_list((u16 *)&per_rows[MAX_RC - pdata->rows],
				    DRV_NAME)) {
				    DRV_NAME)) {
		printk(KERN_ERR DRV_NAME
		dev_err(&pdev->dev, "requesting peripherals failed\n");
			": Requesting Peripherals failed\n");
		error = -EFAULT;
		error = -EFAULT;
		goto out0;
		goto out0;
	}
	}


	if (peripheral_request_list((u16 *)&per_cols[MAX_RC - pdata->cols],
	if (peripheral_request_list((u16 *)&per_cols[MAX_RC - pdata->cols],
				    DRV_NAME)) {
				    DRV_NAME)) {
		printk(KERN_ERR DRV_NAME
		dev_err(&pdev->dev, "requesting peripherals failed\n");
			": Requesting Peripherals failed\n");
		error = -EFAULT;
		error = -EFAULT;
		goto out1;
		goto out1;
	}
	}
@@ -254,9 +251,8 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)
	error = request_irq(bf54x_kpad->irq, bfin_kpad_isr,
	error = request_irq(bf54x_kpad->irq, bfin_kpad_isr,
				0, DRV_NAME, pdev);
				0, DRV_NAME, pdev);
	if (error) {
	if (error) {
		printk(KERN_ERR DRV_NAME
		dev_err(&pdev->dev, "unable to claim irq %d\n",
			": unable to claim irq %d; error %d\n",
			bf54x_kpad->irq);
			bf54x_kpad->irq, error);
		goto out2;
		goto out2;
	}
	}


@@ -297,8 +293,7 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)


	error = input_register_device(input);
	error = input_register_device(input);
	if (error) {
	if (error) {
		printk(KERN_ERR DRV_NAME
		dev_err(&pdev->dev, "unable to register input device\n");
			": Unable to register input device (%d)\n", error);
		goto out4;
		goto out4;
	}
	}


@@ -316,9 +311,6 @@ static int __devinit bfin_kpad_probe(struct platform_device *pdev)


	device_init_wakeup(&pdev->dev, 1);
	device_init_wakeup(&pdev->dev, 1);


	printk(KERN_ERR DRV_NAME
		": Blackfin BF54x Keypad registered IRQ %d\n", bf54x_kpad->irq);

	return 0;
	return 0;


out4:
out4: