Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: i2c-bfin-twi: Move TWI peripheral pin request array to platform data.

Depend on commit cf93feb3a0dee97c7896016a352a3226139fbcf4

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>

authored by

Sonic Zhang and committed by
Wolfram Sang
f88aafe5 c9d87edb

+4 -8
+4 -8
drivers/i2c/busses/i2c-bfin-twi.c
··· 78 78 DEFINE_TWI_REG(RCV_DATA8, 0x88) 79 79 DEFINE_TWI_REG(RCV_DATA16, 0x8C) 80 80 81 - static const u16 pin_req[2][3] = { 82 - {P_TWI0_SCL, P_TWI0_SDA, 0}, 83 - {P_TWI1_SCL, P_TWI1_SDA, 0}, 84 - }; 85 - 86 81 static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface, 87 82 unsigned short twi_int_status) 88 83 { ··· 707 712 p_adap->timeout = 5 * HZ; 708 713 p_adap->retries = 3; 709 714 710 - rc = peripheral_request_list(pin_req[pdev->id], "i2c-bfin-twi"); 715 + rc = peripheral_request_list((unsigned short *)pdev->dev.platform_data, 716 + "i2c-bfin-twi"); 711 717 if (rc) { 712 718 dev_err(&pdev->dev, "Can't setup pin mux!\n"); 713 719 goto out_error_pin_mux; ··· 755 759 free_irq(iface->irq, iface); 756 760 out_error_req_irq: 757 761 out_error_no_irq: 758 - peripheral_free_list(pin_req[pdev->id]); 762 + peripheral_free_list((unsigned short *)pdev->dev.platform_data); 759 763 out_error_pin_mux: 760 764 iounmap(iface->regs_base); 761 765 out_error_ioremap: ··· 773 777 774 778 i2c_del_adapter(&(iface->adap)); 775 779 free_irq(iface->irq, iface); 776 - peripheral_free_list(pin_req[pdev->id]); 780 + peripheral_free_list((unsigned short *)pdev->dev.platform_data); 777 781 iounmap(iface->regs_base); 778 782 kfree(iface); 779 783