diff options
| author | bernard.xiong <[email protected]> | 2010-11-29 07:47:47 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-11-29 07:47:47 +0000 |
| commit | 5a4d618832c0cb817bc4cf8a0e3d753bda628355 (patch) | |
| tree | 2e880e17886a10665a6abc88c158ac112518debf /libcpu/arm/s3c24x0 | |
| parent | 7a80d831c961d5c116fba457d3783459bbf41b6e (diff) | |
rename the private field in device to user_data.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1133 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libcpu/arm/s3c24x0')
| -rw-r--r-- | libcpu/arm/s3c24x0/rtc.c | 2 | ||||
| -rw-r--r-- | libcpu/arm/s3c24x0/serial.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libcpu/arm/s3c24x0/rtc.c b/libcpu/arm/s3c24x0/rtc.c index 86215f5b26..065d0e9298 100644 --- a/libcpu/arm/s3c24x0/rtc.c +++ b/libcpu/arm/s3c24x0/rtc.c @@ -165,7 +165,7 @@ void rt_hw_rtc_init(void) rtc.control = rtc_control;
/* no private */
- rtc.private = RT_NULL;
+ rtc.user_data = RT_NULL;
rt_device_register(&rtc, "rtc", RT_DEVICE_FLAG_RDWR);
}
diff --git a/libcpu/arm/s3c24x0/serial.c b/libcpu/arm/s3c24x0/serial.c index 688f23c9f9..1e851c1ec5 100644 --- a/libcpu/arm/s3c24x0/serial.c +++ b/libcpu/arm/s3c24x0/serial.c @@ -28,7 +28,7 @@ */ static rt_err_t rt_serial_init (rt_device_t dev) { - struct serial_device* uart = (struct serial_device*) dev->private; + struct serial_device* uart = (struct serial_device*) dev->user_data; if (!(dev->flag & RT_DEVICE_FLAG_ACTIVATED)) { @@ -100,7 +100,7 @@ static rt_size_t rt_serial_read (rt_device_t dev, rt_off_t pos, void* buffer, rt ptr = buffer; err_code = RT_EOK; - uart = (struct serial_device*)dev->private; + uart = (struct serial_device*)dev->user_data; if (dev->flag & RT_DEVICE_FLAG_INT_RX) { @@ -158,7 +158,7 @@ static rt_size_t rt_serial_write (rt_device_t dev, rt_off_t pos, const void* buf err_code = RT_EOK; ptr = (rt_uint8_t*)buffer; - uart = (struct serial_device*)dev->private; + uart = (struct serial_device*)dev->user_data; if (dev->flag & RT_DEVICE_FLAG_INT_TX) { @@ -246,7 +246,7 @@ rt_err_t rt_hw_serial_register(rt_device_t device, const char* name, rt_uint32_t device->read = rt_serial_read; device->write = rt_serial_write; device->control = rt_serial_control; - device->private = serial; + device->user_data = serial; /* register a character device */ return rt_device_register(device, name, RT_DEVICE_FLAG_RDWR | flag); @@ -255,7 +255,7 @@ rt_err_t rt_hw_serial_register(rt_device_t device, const char* name, rt_uint32_t /* ISR for serial interrupt */ void rt_hw_serial_isr(rt_device_t device) { - struct serial_device* uart = (struct serial_device*) device->private; + struct serial_device* uart = (struct serial_device*) device->user_data; /* interrupt mode receive */ RT_ASSERT(device->flag & RT_DEVICE_FLAG_INT_RX); |
