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

[media] media: rc: nuvoton: rename spinlock nvt_lock

Spinlock nvt_lock is a member of struct nvt_dev and there's no need
to prefix it with nvt_. So remove this prefix.

[mchehab@s-opensource.org: change the prefix also at the open function,
as the patch removing it were not applied (yet?)]
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Heiner Kallweit and committed by
Mauro Carvalho Chehab
73d4576d f7ceec4f

+23 -23
+22 -22
drivers/media/rc/nuvoton-cir.c
··· 187 187 ssize_t buf_len = 0; 188 188 int i; 189 189 190 - spin_lock_irqsave(&nvt->nvt_lock, flags); 190 + spin_lock_irqsave(&nvt->lock, flags); 191 191 192 192 fifo_len = nvt_cir_wake_reg_read(nvt, CIR_WAKE_FIFO_COUNT); 193 193 fifo_len = min(fifo_len, WAKEUP_MAX_SIZE); ··· 204 204 } 205 205 buf_len += snprintf(buf + buf_len, PAGE_SIZE - buf_len, "\n"); 206 206 207 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 207 + spin_unlock_irqrestore(&nvt->lock, flags); 208 208 209 209 return buf_len; 210 210 } ··· 248 248 /* hardcode the tolerance to 10% */ 249 249 tolerance = DIV_ROUND_UP(count, 10); 250 250 251 - spin_lock_irqsave(&nvt->nvt_lock, flags); 251 + spin_lock_irqsave(&nvt->lock, flags); 252 252 253 253 nvt_clear_cir_wake_fifo(nvt); 254 254 nvt_cir_wake_reg_write(nvt, count, CIR_WAKE_FIFO_CMP_DEEP); ··· 265 265 266 266 nvt_cir_wake_reg_write(nvt, config, CIR_WAKE_IRCON); 267 267 268 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 268 + spin_unlock_irqrestore(&nvt->lock, flags); 269 269 270 270 ret = len; 271 271 out: ··· 590 590 591 591 nvt_efm_disable(nvt); 592 592 593 - spin_lock_irqsave(&nvt->nvt_lock, flags); 593 + spin_lock_irqsave(&nvt->lock, flags); 594 594 595 595 nvt_cir_wake_reg_write(nvt, CIR_WAKE_IRCON_MODE0 | CIR_WAKE_IRCON_RXEN | 596 596 CIR_WAKE_IRCON_R | CIR_WAKE_IRCON_RXINV | ··· 599 599 nvt_cir_wake_reg_write(nvt, 0xff, CIR_WAKE_IRSTS); 600 600 nvt_cir_wake_reg_write(nvt, 0, CIR_WAKE_IREN); 601 601 602 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 602 + spin_unlock_irqrestore(&nvt->lock, flags); 603 603 } 604 604 605 605 #if 0 /* Currently unused */ 606 - /* rx carrier detect only works in learning mode, must be called w/nvt_lock */ 606 + /* rx carrier detect only works in learning mode, must be called w/lock */ 607 607 static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt) 608 608 { 609 609 u32 count, carrier, duration = 0; ··· 688 688 u8 iren; 689 689 int ret; 690 690 691 - spin_lock_irqsave(&nvt->nvt_lock, flags); 691 + spin_lock_irqsave(&nvt->lock, flags); 692 692 693 693 ret = min((unsigned)(TX_BUF_LEN / sizeof(unsigned)), n); 694 694 nvt->tx.buf_count = (ret * sizeof(unsigned)); ··· 712 712 for (i = 0; i < 9; i++) 713 713 nvt_cir_reg_write(nvt, 0x01, CIR_STXFIFO); 714 714 715 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 715 + spin_unlock_irqrestore(&nvt->lock, flags); 716 716 717 717 wait_event(nvt->tx.queue, nvt->tx.tx_state == ST_TX_REQUEST); 718 718 719 - spin_lock_irqsave(&nvt->nvt_lock, flags); 719 + spin_lock_irqsave(&nvt->lock, flags); 720 720 nvt->tx.tx_state = ST_TX_NONE; 721 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 721 + spin_unlock_irqrestore(&nvt->lock, flags); 722 722 723 723 /* restore enabled interrupts to prior state */ 724 724 nvt_cir_reg_write(nvt, iren, CIR_IREN); ··· 844 844 845 845 nvt_dbg_verbose("%s firing", __func__); 846 846 847 - spin_lock_irqsave(&nvt->nvt_lock, flags); 847 + spin_lock_irqsave(&nvt->lock, flags); 848 848 849 849 /* 850 850 * Get IR Status register contents. Write 1 to ack/clear ··· 866 866 * logical device is being disabled. 867 867 */ 868 868 if (status == 0xff && iren == 0xff) { 869 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 869 + spin_unlock_irqrestore(&nvt->lock, flags); 870 870 nvt_dbg_verbose("Spurious interrupt detected"); 871 871 return IRQ_HANDLED; 872 872 } ··· 875 875 * status bit whether the related interrupt source is enabled 876 876 */ 877 877 if (!(status & iren)) { 878 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 878 + spin_unlock_irqrestore(&nvt->lock, flags); 879 879 nvt_dbg_verbose("%s exiting, IRSTS 0x0", __func__); 880 880 return IRQ_NONE; 881 881 } ··· 923 923 } 924 924 } 925 925 926 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 926 + spin_unlock_irqrestore(&nvt->lock, flags); 927 927 928 928 nvt_dbg_verbose("%s done", __func__); 929 929 return IRQ_HANDLED; ··· 933 933 { 934 934 unsigned long flags; 935 935 936 - spin_lock_irqsave(&nvt->nvt_lock, flags); 936 + spin_lock_irqsave(&nvt->lock, flags); 937 937 938 938 /* disable CIR interrupts */ 939 939 nvt_cir_reg_write(nvt, 0, CIR_IREN); ··· 948 948 nvt_clear_cir_fifo(nvt); 949 949 nvt_clear_tx_fifo(nvt); 950 950 951 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 951 + spin_unlock_irqrestore(&nvt->lock, flags); 952 952 953 953 /* disable the CIR logical device */ 954 954 nvt_disable_logical_dev(nvt, LOGICAL_DEV_CIR); ··· 959 959 struct nvt_dev *nvt = dev->priv; 960 960 unsigned long flags; 961 961 962 - spin_lock_irqsave(&nvt->nvt_lock, flags); 962 + spin_lock_irqsave(&nvt->lock, flags); 963 963 964 964 /* set function enable flags */ 965 965 nvt_cir_reg_write(nvt, CIR_IRCON_TXEN | CIR_IRCON_RXEN | ··· 972 972 /* enable interrupts */ 973 973 nvt_set_cir_iren(nvt); 974 974 975 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 975 + spin_unlock_irqrestore(&nvt->lock, flags); 976 976 977 977 /* enable the CIR logical device */ 978 978 nvt_enable_logical_dev(nvt, LOGICAL_DEV_CIR); ··· 1037 1037 nvt->cr_efir = CR_EFIR; 1038 1038 nvt->cr_efdr = CR_EFDR; 1039 1039 1040 - spin_lock_init(&nvt->nvt_lock); 1040 + spin_lock_init(&nvt->lock); 1041 1041 1042 1042 pnp_set_drvdata(pdev, nvt); 1043 1043 ··· 1137 1137 1138 1138 nvt_dbg("%s called", __func__); 1139 1139 1140 - spin_lock_irqsave(&nvt->nvt_lock, flags); 1140 + spin_lock_irqsave(&nvt->lock, flags); 1141 1141 1142 1142 nvt->tx.tx_state = ST_TX_NONE; 1143 1143 1144 1144 /* disable all CIR interrupts */ 1145 1145 nvt_cir_reg_write(nvt, 0, CIR_IREN); 1146 1146 1147 - spin_unlock_irqrestore(&nvt->nvt_lock, flags); 1147 + spin_unlock_irqrestore(&nvt->lock, flags); 1148 1148 1149 1149 /* disable cir logical dev */ 1150 1150 nvt_disable_logical_dev(nvt, LOGICAL_DEV_CIR);
+1 -1
drivers/media/rc/nuvoton-cir.h
··· 80 80 struct nvt_dev { 81 81 struct rc_dev *rdev; 82 82 83 - spinlock_t nvt_lock; 83 + spinlock_t lock; 84 84 85 85 /* for rx */ 86 86 u8 buf[RX_BUF_LEN];