Lines Matching full:off

118 		char *buf, loff_t off, size_t count)  in rio_read_config()  argument
122 loff_t init_off = off; in rio_read_config()
129 if (off >= size) in rio_read_config()
131 if (off + count > size) { in rio_read_config()
132 size -= off; in rio_read_config()
138 if ((off & 1) && size) { in rio_read_config()
140 rio_read_config_8(dev, off, &val); in rio_read_config()
141 data[off - init_off] = val; in rio_read_config()
142 off++; in rio_read_config()
146 if ((off & 3) && size > 2) { in rio_read_config()
148 rio_read_config_16(dev, off, &val); in rio_read_config()
149 data[off - init_off] = (val >> 8) & 0xff; in rio_read_config()
150 data[off - init_off + 1] = val & 0xff; in rio_read_config()
151 off += 2; in rio_read_config()
157 rio_read_config_32(dev, off, &val); in rio_read_config()
158 data[off - init_off] = (val >> 24) & 0xff; in rio_read_config()
159 data[off - init_off + 1] = (val >> 16) & 0xff; in rio_read_config()
160 data[off - init_off + 2] = (val >> 8) & 0xff; in rio_read_config()
161 data[off - init_off + 3] = val & 0xff; in rio_read_config()
162 off += 4; in rio_read_config()
168 rio_read_config_16(dev, off, &val); in rio_read_config()
169 data[off - init_off] = (val >> 8) & 0xff; in rio_read_config()
170 data[off - init_off + 1] = val & 0xff; in rio_read_config()
171 off += 2; in rio_read_config()
177 rio_read_config_8(dev, off, &val); in rio_read_config()
178 data[off - init_off] = val; in rio_read_config()
179 off++; in rio_read_config()
189 char *buf, loff_t off, size_t count) in rio_write_config() argument
193 loff_t init_off = off; in rio_write_config()
196 if (off >= RIO_MAINT_SPACE_SZ) in rio_write_config()
198 if (off + count > RIO_MAINT_SPACE_SZ) { in rio_write_config()
199 size = RIO_MAINT_SPACE_SZ - off; in rio_write_config()
203 if ((off & 1) && size) { in rio_write_config()
204 rio_write_config_8(dev, off, data[off - init_off]); in rio_write_config()
205 off++; in rio_write_config()
209 if ((off & 3) && (size > 2)) { in rio_write_config()
210 u16 val = data[off - init_off + 1]; in rio_write_config()
211 val |= (u16) data[off - init_off] << 8; in rio_write_config()
212 rio_write_config_16(dev, off, val); in rio_write_config()
213 off += 2; in rio_write_config()
218 u32 val = data[off - init_off + 3]; in rio_write_config()
219 val |= (u32) data[off - init_off + 2] << 8; in rio_write_config()
220 val |= (u32) data[off - init_off + 1] << 16; in rio_write_config()
221 val |= (u32) data[off - init_off] << 24; in rio_write_config()
222 rio_write_config_32(dev, off, val); in rio_write_config()
223 off += 4; in rio_write_config()
228 u16 val = data[off - init_off + 1]; in rio_write_config()
229 val |= (u16) data[off - init_off] << 8; in rio_write_config()
230 rio_write_config_16(dev, off, val); in rio_write_config()
231 off += 2; in rio_write_config()
236 rio_write_config_8(dev, off, data[off - init_off]); in rio_write_config()
237 off++; in rio_write_config()